From 754b1cec7a39723b415ee76e797e587a7b5054dc Mon Sep 17 00:00:00 2001 From: "David B. Lamkins" Date: Tue, 19 Apr 2016 22:51:29 +0200 Subject: 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. --- vis-cmds.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vis-cmds.c') diff --git a/vis-cmds.c b/vis-cmds.c index 401d77d..7d3e0ab 100644 --- a/vis-cmds.c +++ b/vis-cmds.c @@ -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; -- cgit v1.2.3