vis

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

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

commit a817da3535e2a3808f102ab41050dcab37dedb50
parent edda4d193da38f00e2a9b79b6c7eeab51abbe80f
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri, 30 Dec 2016 16:39:46 +0100

sam: use more expressive name for select command

This is not really used, but commands can expect to have argv[0] set
to something. Also "s" is ambigious with the substitute command.

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

diff --git a/sam.c b/sam.c @@ -814,7 +814,7 @@ static Command *command_parse(Vis *vis, const char **s, enum SamError *err) { if (!(cmd->cmd = command_parse(vis, s, err))) goto fail; if (strcmp(cmd->argv[0], "X") == 0 || strcmp(cmd->argv[0], "Y") == 0) { - Command *sel = command_new("s"); + Command *sel = command_new("select"); if (!sel) goto fail; sel->cmd = cmd->cmd; @@ -844,7 +844,7 @@ static Command *sam_parse(Vis *vis, const char *cmd, enum SamError *err) { return NULL; } - Command *sel = command_new("s"); + Command *sel = command_new("select"); if (!sel) { command_free(c); return NULL;