diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-03-19 11:51:00 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-03-19 14:58:06 +0100 |
| commit | 42f04699d6df2d5b144533737a8f2f7e0814ad85 (patch) | |
| tree | 3d69b94c221e3b91749b7f09b7f4da89839206ca /vis-cmds.c | |
| parent | 8919fd1cbeef89aa3a5fce9c00aa708335e1de85 (diff) | |
| download | vis-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.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -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: |
