diff options
Diffstat (limited to 'vis-cmds.c')
| -rw-r--r-- | vis-cmds.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -158,6 +158,7 @@ static bool cmd_set(Vis *vis, Filerange *range, enum CmdOpt cmdopt, const char * OPTION_SHOW, OPTION_NUMBER, OPTION_NUMBER_RELATIVE, + OPTION_CURSOR_LINE, }; /* definitions have to be in the same order as the enum above */ @@ -169,6 +170,7 @@ static bool cmd_set(Vis *vis, Filerange *range, enum CmdOpt cmdopt, const char * [OPTION_SHOW] = { { "show" }, OPTION_TYPE_STRING }, [OPTION_NUMBER] = { { "numbers", "nu" }, OPTION_TYPE_BOOL }, [OPTION_NUMBER_RELATIVE] = { { "relativenumbers", "rnu" }, OPTION_TYPE_BOOL }, + [OPTION_CURSOR_LINE] = { { "cursorline", "cul" }, OPTION_TYPE_BOOL }, }; if (!vis->options) { @@ -313,6 +315,15 @@ static bool cmd_set(Vis *vis, Filerange *range, enum CmdOpt cmdopt, const char * view_options_set(vis->win->view, opt); break; } + case OPTION_CURSOR_LINE: { + enum UiOption opt = view_options_get(vis->win->view); + if (arg.b) + opt |= UI_OPTION_CURSOR_LINE; + else + opt &= ~UI_OPTION_CURSOR_LINE; + view_options_set(vis->win->view, opt); + break; + } } return true; |
