diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-11-05 01:24:51 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-11-05 01:24:51 +0000 |
commit | e4341883f464f9781001e6a625417f4570553359 (patch) | |
tree | 0fc2eeb7f393031debfbe344bf25f187a11e38de /bin | |
parent | 24a49b9e0a1ec6a532f66fa925116fa92385431a (diff) |
Remove an alias for a macro.
ok nicm@
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ksh/vi.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/bin/ksh/vi.c b/bin/ksh/vi.c index ea114929d1f..2f157fbefee 100644 --- a/bin/ksh/vi.c +++ b/bin/ksh/vi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vi.c,v 1.36 2015/10/19 14:42:16 mmcc Exp $ */ +/* $OpenBSD: vi.c,v 1.37 2015/11/05 01:24:50 mmcc Exp $ */ /* * vi command editing @@ -19,7 +19,6 @@ #define CMDLEN 2048 #define Ctrl(c) (c&0x1f) -#define is_wordch(c) (letnum(c)) struct edstate { int winleft; @@ -1522,12 +1521,12 @@ forwword(int argcnt) ncursor = es->cursor; while (ncursor < es->linelen && argcnt--) { - if (is_wordch(es->cbuf[ncursor])) - while (is_wordch(es->cbuf[ncursor]) && + if (letnum(es->cbuf[ncursor])) + while (letnum(es->cbuf[ncursor]) && ncursor < es->linelen) ncursor++; else if (!isspace((unsigned char)es->cbuf[ncursor])) - while (!is_wordch(es->cbuf[ncursor]) && + while (!letnum(es->cbuf[ncursor]) && !isspace((unsigned char)es->cbuf[ncursor]) && ncursor < es->linelen) ncursor++; @@ -1548,13 +1547,13 @@ backword(int argcnt) while (--ncursor > 0 && isspace((unsigned char)es->cbuf[ncursor])) ; if (ncursor > 0) { - if (is_wordch(es->cbuf[ncursor])) + if (letnum(es->cbuf[ncursor])) while (--ncursor >= 0 && - is_wordch(es->cbuf[ncursor])) + letnum(es->cbuf[ncursor])) ; else while (--ncursor >= 0 && - !is_wordch(es->cbuf[ncursor]) && + !letnum(es->cbuf[ncursor]) && !isspace((unsigned char)es->cbuf[ncursor])) ; ncursor++; @@ -1574,13 +1573,13 @@ endword(int argcnt) isspace((unsigned char)es->cbuf[ncursor])) ; if (ncursor < es->linelen - 1) { - if (is_wordch(es->cbuf[ncursor])) + if (letnum(es->cbuf[ncursor])) while (++ncursor < es->linelen && - is_wordch(es->cbuf[ncursor])) + letnum(es->cbuf[ncursor])) ; else while (++ncursor < es->linelen && - !is_wordch(es->cbuf[ncursor]) && + !letnum(es->cbuf[ncursor]) && !isspace((unsigned char)es->cbuf[ncursor])) ; ncursor--; |