vis

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

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

commit 3c4d95d79df0346b6106ef6b54270310ad09fbcb
parent 6bf76e7fa90b918252bb41ff683d846a831a18ce
Author: Christian Hesse <mail@eworm.de>
Date:   Wed, 22 Apr 2015 13:59:49 +0200

for editor command compare string, not just first character

Signed-off-by: Christian Hesse <mail@eworm.de>

Diffstat:
Mvis.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vis.c b/vis.c @@ -1995,7 +1995,7 @@ int main(int argc, char *argv[]) { while (*arg0 && (*arg0 == '.' || *arg0 == '/')) arg0++; for (int i = 0; i < LENGTH(editors); i++) { - if (editors[i].name[0] == arg0[0]) { + if (strcmp(editors[i].name, arg0) == 0) { config = &editors[i]; break; }