vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit c9751967bf2fc96a8edea686aa6465874dcdaaeb
parent 1ddde4d2106b21fbd55669e767a58515d881a109
Author: Marc André Tanner <mat@brain-dump.org>
Date: Wed, 2 Nov 2016 23:02:33 +0100
sam: fix default command handling at end of a group
Something like :{ x/pattern/ } should select all occurrences of pattern.
Diffstat:
| M | sam.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sam.c b/sam.c @@ -616,7 +616,7 @@ static Command *command_parse(Vis *vis, const char **s, int level, enum SamError if (cmddef->flags & CMD_CMD) { skip_spaces(s); - if (cmddef->defcmd && (**s == '\n' || **s == '\0')) { + if (cmddef->defcmd && (**s == '\n' || **s == '}' || **s == '\0')) { if (**s == '\n') (*s)++; if (!(cmd->cmd = command_new(cmddef->defcmd)))