summaryrefslogtreecommitdiff
path: root/ex_voper.c
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-06-23 21:34:41 -0700
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-06-23 21:34:41 -0700
commit874d317334fae1ddce316f9b6f4d0ce4e434bf52 (patch)
tree929f924d3c3696d3aa9917aca0e7048bbe3e93e8 /ex_voper.c
parent15bd7946cc838a3151c357e4b0bc1ab85eecda62 (diff)
heirloom vi fixes from arch AUR
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);
}