aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-10-19 23:05:54 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-11-08 13:37:23 +0100
commitcbc96c96d193829fc882c5b4d83c2006a232cfe6 (patch)
tree9997e3115dcf1dd5ce0af96b2f7f4bed6ffe7649 /vis-cmds.c
parent6eb3dbc60f054c81ef071c79b0f438cdd0bbb1f1 (diff)
downloadvis-cbc96c96d193829fc882c5b4d83c2006a232cfe6.tar.gz
vis-cbc96c96d193829fc882c5b4d83c2006a232cfe6.tar.xz
vis: implement :set colorcolumn
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vis-cmds.c b/vis-cmds.c
index 09edd58..0ddb2bc 100644
--- a/vis-cmds.c
+++ b/vis-cmds.c
@@ -160,6 +160,7 @@ static bool cmd_set(Vis *vis, Filerange *range, enum CmdOpt cmdopt, const char *
OPTION_NUMBER_RELATIVE,
OPTION_CURSOR_LINE,
OPTION_THEME,
+ OPTION_COLOR_COLUMN,
};
/* definitions have to be in the same order as the enum above */
@@ -173,6 +174,7 @@ static bool cmd_set(Vis *vis, Filerange *range, enum CmdOpt cmdopt, const char *
[OPTION_NUMBER_RELATIVE] = { { "relativenumbers", "rnu" }, OPTION_TYPE_BOOL },
[OPTION_CURSOR_LINE] = { { "cursorline", "cul" }, OPTION_TYPE_BOOL },
[OPTION_THEME] = { { "theme" }, OPTION_TYPE_STRING },
+ [OPTION_COLOR_COLUMN] = { { "colorcolumn", "cc" }, OPTION_TYPE_NUMBER },
};
if (!vis->options) {
@@ -333,6 +335,9 @@ static bool cmd_set(Vis *vis, Filerange *range, enum CmdOpt cmdopt, const char *
return false;
}
break;
+ case OPTION_COLOR_COLUMN:
+ view_colorcolumn_set(vis->win->view, arg.i);
+ break;
}
return true;