aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-03-19 11:51:00 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-03-19 14:58:06 +0100
commit42f04699d6df2d5b144533737a8f2f7e0814ad85 (patch)
tree3d69b94c221e3b91749b7f09b7f4da89839206ca /vis-cmds.c
parent8919fd1cbeef89aa3a5fce9c00aa708335e1de85 (diff)
downloadvis-42f04699d6df2d5b144533737a8f2f7e0814ad85.tar.gz
vis-42f04699d6df2d5b144533737a8f2f7e0814ad85.tar.xz
Move :set syntax option implementation to lua
It is no longer possible to change the used syntax by assigning to the `win.syntax = name` field, instead the function win:set_syntax(name)` should be called. The distinction between filetype and syntax lexer to use should probably be clarified/cleaned up at some point.
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/vis-cmds.c b/vis-cmds.c
index 812fbed..bcfded0 100644
--- a/vis-cmds.c
+++ b/vis-cmds.c
@@ -262,23 +262,6 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor
case OPTION_TABWIDTH:
tabwidth_set(vis, arg.i);
break;
- case OPTION_SYNTAX:
- if (!argv[2]) {
- const char *syntax = vis_window_syntax_get(win);
- if (syntax)
- vis_info_show(vis, "Syntax definition in use: `%s'", syntax);
- else
- vis_info_show(vis, "No syntax definition in use");
- return true;
- }
-
- if (parse_bool(argv[2], &arg.b) && !arg.b)
- return vis_window_syntax_set(win, NULL);
- if (!vis_window_syntax_set(win, argv[2])) {
- vis_info_show(vis, "Unknown syntax definition: `%s'", argv[2]);
- return false;
- }
- break;
case OPTION_SHOW_SPACES:
case OPTION_SHOW_TABS:
case OPTION_SHOW_NEWLINES: