diff options
| author | David B. Lamkins <david@lamkins.net> | 2016-04-19 22:51:29 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-19 23:03:09 +0200 |
| commit | 754b1cec7a39723b415ee76e797e587a7b5054dc (patch) | |
| tree | 556d63ccefd7301719aec4f51a9b66b2964c98cc /vis-cmds.c | |
| parent | aab8b6c44151cb086850ba9872251cfc452506b7 (diff) | |
| download | vis-754b1cec7a39723b415ee76e797e587a7b5054dc.tar.gz vis-754b1cec7a39723b415ee76e797e587a7b5054dc.tar.xz | |
vis: add :set horizon option
Can be used to specify the number of bytes before the visible area
to consider for syntax highlighting.
Defaults to 32K for now, whereas before it was 16K.
Diffstat (limited to 'vis-cmds.c')
| -rw-r--r-- | vis-cmds.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -59,6 +59,7 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor OPTION_CURSOR_LINE, OPTION_THEME, OPTION_COLOR_COLUMN, + OPTION_HORIZON, }; /* definitions have to be in the same order as the enum above */ @@ -73,6 +74,7 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor [OPTION_CURSOR_LINE] = { { "cursorline", "cul" }, OPTION_TYPE_BOOL }, [OPTION_THEME] = { { "theme" }, OPTION_TYPE_STRING }, [OPTION_COLOR_COLUMN] = { { "colorcolumn", "cc" }, OPTION_TYPE_NUMBER }, + [OPTION_HORIZON] = { { "horizon" }, OPTION_TYPE_UNSIGNED }, }; if (!vis->options) { @@ -242,6 +244,9 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor case OPTION_COLOR_COLUMN: view_colorcolumn_set(win->view, arg.i); break; + case OPTION_HORIZON: + view_horizon_set(win->view, arg.u); + break; } return true; |
