summaryrefslogtreecommitdiff
path: root/ex_vput.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_vput.c
parent15bd7946cc838a3151c357e4b0bc1ab85eecda62 (diff)
heirloom vi fixes from arch AUR
Diffstat (limited to 'ex_vput.c')
-rw-r--r--ex_vput.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ex_vput.c b/ex_vput.c
index 1851b67..7e66d2a 100644
--- a/ex_vput.c
+++ b/ex_vput.c
@@ -155,7 +155,7 @@ vclreol(void)
i = WCOLS - destcol;
tp = vtube[destline] + destcol;
if (CE) {
- if (IN && *tp || !ateopr()) {
+ if ((IN && *tp) || !ateopr()) {
vcsync();
vputp(CE, 1);
}
@@ -1018,7 +1018,7 @@ viin(int c)
short oldhold = hold;
hold |= HOLDPUPD;
- if (tabsize && (IM && EI) && inssiz - doomed > tabslack)
+ if (tabsize && (IM && EI) && inssiz - doomed > tabslack) {
/*
* There is a tab out there which will be affected
* by the insertion since there aren't enough doomed
@@ -1057,6 +1057,7 @@ viin(int c)
enddm();
}
}
+ }
/*
* Now put out the characters of the actual insertion.
@@ -1067,7 +1068,7 @@ viin(int c)
if (remdoom > insmc1) {
remdoom--;
endim();
- } else if (noim || insmc1 && remdoom == insmc1)
+ } else if (noim || (insmc1 && remdoom == insmc1))
endim();
else if (IM && EI) {
vcsync();
@@ -1076,7 +1077,7 @@ viin(int c)
vputchar(c);
}
- if (!IM || !EI || remdoom && remdoom == insmc1) {
+ if (!IM || !EI || (remdoom && remdoom == insmc1)) {
/*
* We are a dumb terminal; brute force update
* the rest of the line; this is very much an n^^2 process,
@@ -1388,7 +1389,7 @@ def:
* that we have overstruct something.
*/
if (!insmode && d && d != ' ' && d != (c & TRIM)) {
- if (EO && (OS || UL && (c == '_' || d == '_'))) {
+ if (EO && (OS || (UL && (c == '_' || d == '_')))) {
vputc(' ');
outcol++, destcol++;
back1();
@@ -1551,7 +1552,7 @@ physdc(int stcol, int endcol)
if (IN) {
up = vtube0 + stcol;
tp = vtube0 + endcol;
- while (i = *tp++) {
+ while ((i = *tp++)) {
if ((i & (QUOTE|TRIM)) == QUOTE)
break;
*up++ = i;