vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 78ff600856b2d06f8f930bd1a8ee541615dcebd3
parent 06f4e90fc0938231b87493f8ebbcce27cf1a0802
Author: Marc André Tanner <mat@brain-dump.org>
Date: Sat, 14 Jan 2017 15:58:52 +0100
sam: do not clobber error value when failing to parse a group
When encountering a parsing error within a { } command group do not
set the error cause to unmatched brace.
Diffstat:
| M | sam.c | | | 2 | ++ |
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/sam.c b/sam.c @@ -828,6 +828,8 @@ static Command *command_parse(Vis *vis, const char **s, enum SamError *err) { while (**s == ' ' || **s == '\t' || **s == '\n') (*s)++; next = command_parse(vis, s, err); + if (*err) + goto fail; if (prev) prev->next = next; else