* zle_refresh.c bug fix
@ 1995-07-25 7:55 Geoff Wing
0 siblings, 0 replies; only message in thread
From: Geoff Wing @ 1995-07-25 7:55 UTC (permalink / raw)
To: zsh-list
Heyla, as Wayne Davison pointed out in message 252, I made an error in my
patch in message 164. The patch below will fix it. I must have been
thinking of some possible exception when I wrote it, but when I looked
at it before, there didn't seem to be any such. Strange things must be
happening with my mind's logic processes. Anyway, it's a unidiff to
base + my patch (in 164) only (I think).
--- zle_refresh.c.~1~ Fri Jul 7 12:32:32 1995
+++ zle_refresh.c Tue Jul 25 17:28:16 1995
@@ -470,15 +470,14 @@
for (;;) {
/* skip past all matching characters */
for (; *nl && (*nl == *ol); nl++, ol++, ccs++) ;
if (!*nl) {
- if ((char_ins <= 0) || (vcs >= winw)) /* written everything */
+ if ((char_ins <= 0) || (ccs >= winw)) /* written everything */
return;
else /* we've got junk on the right yet to clear */
- if (tccan(TCCLEAREOL) && (char_ins >= tclen[TCCLEAREOL])
- && ccs < winw)
+ if (tccan(TCCLEAREOL) && (char_ins >= tclen[TCCLEAREOL]))
col_cleareol = 0; /* force a clear to end of line */
}
moveto(ln, ccs); /* move to where we do all output from */
@@ -489,16 +488,15 @@
return;
}
/* we've written out the new but yet to clear rubbish due to inserts */
if (!*nl) {
- if ((i = (winw - ccs < char_ins ? winw - ccs : char_ins)) == 0)
- return;
+ i = (winw - ccs < char_ins) ? (winw - ccs) : char_ins;
if (tccan(TCDEL) && (tcdelcost(i) <= i + 1))
tc_delchars(i);
else {
- SELECT_ADD_COST(i);
+ SELECT_ADD_COST(i);
vcs += i;
while (i-- > 0)
putc(' ', shout);
}
return;
--
Mason [G.C.W] mason@werple.mira.net.au Hurt...Agony...Pain...LOVE-IT
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1995-07-25 8:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-07-25 7:55 zle_refresh.c bug fix Geoff Wing
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).