summaryrefslogtreecommitdiff
path: root/ex_voper.c
diff options
context:
space:
mode:
Diffstat (limited to 'ex_voper.c')
-rw-r--r--ex_voper.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ex_voper.c b/ex_voper.c
index 5cb693e..07df03b 100644
--- a/ex_voper.c
+++ b/ex_voper.c
@@ -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);
}