diff options
Diffstat (limited to 'ex_voper.c')
| -rw-r--r-- | ex_voper.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -159,7 +159,7 @@ operate(register int c, register int cnt) * c Change operator. */ case 'c': - if (c == 'c' && workcmd[0] == 'C' || workcmd[0] == 'S') + if ((c == 'c' && workcmd[0] == 'C') || workcmd[0] == 'S') subop++; moveop = vchange; deleteop = (void (*)(int))beep; @@ -492,13 +492,13 @@ fixup: */ case 'l': case ' ': - forbid (margin() || opf == vmove && edge()); + forbid (margin() || (opf == vmove && edge())); while (cnt > 0 && !margin()) { wcursor += dir>0 ? skipright(linebuf, wcursor) : skipleft(linebuf, wcursor); cnt--; } - if (margin() && opf == vmove || wcursor < linebuf) + if ((margin() && opf == vmove) || wcursor < linebuf) wcursor -= dir; vmoving = 0; break; @@ -838,7 +838,7 @@ find(int c) int word(register void (*op)(int), int cnt) { - register int which = 0, i; + register int which, i; register char *iwc; register line *iwdot = wdot; @@ -881,6 +881,7 @@ word(register void (*op)(int), int cnt) while (!margin() && wordof(which, wcursor)) wcursor--; } + which = wordch(wcursor); if (wcursor < linebuf || !wordof(which, wcursor)) wcursor += skipright(linebuf, wcursor); } |
