vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 1ddde4d2106b21fbd55669e767a58515d881a109
parent 01e8c0c999baf7d0d810c72fbf4940f4f8370e3a
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed,  2 Nov 2016 23:00:49 +0100

sam: ignore white space between commands of a group

Diffstat:
Msam.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sam.c b/sam.c @@ -560,8 +560,7 @@ static Command *command_parse(Vis *vis, const char **s, int level, enum SamError if (strcmp(cmd->argv[0], "{") == 0) { Command *prev = NULL, *next; do { - skip_spaces(s); - if (**s == '\n') + while (**s == ' ' || **s == '\t' || **s == '\n') (*s)++; next = command_parse(vis, s, level+1, err); if (prev)