vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 945a88c4ccc724c790caf75b00fa37133a9ccbe4 parent 3c1fed2324637e1ddec89cb854b62bb270a9159b Author: Marc André Tanner <mat@brain-dump.org> Date: Sun, 29 May 2016 10:51:50 +0200 sam: use more suitable error message if no command is given Diffstat:
| M | sam.c | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sam.c b/sam.c @@ -493,8 +493,10 @@ static const CommandDef *command_lookup(Vis *vis, const char *name) { } static Command *command_parse(Vis *vis, const char **s, int level, enum SamError *err) { - if (!**s) + if (!**s) { + *err = SAM_ERR_COMMAND; return NULL; + } Command *cmd = command_new(NULL); if (!cmd) return NULL;