Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zle_refresh patch - also see next message
- X-seq: zsh-workers 2386
- From: Geoff Wing <gwing@xxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (zsh-workers)
- Subject: zle_refresh patch - also see next message
- Date: Wed, 13 Nov 1996 23:54:45 +1100 (EST)
Heyla,
this adds a bit more checking - hopefully unnecessary.
It's built on my previous patches zsh-workers/{2336,2351,2359}
The message following this contains a bug fix for a stupid bug that have
been causing some people trouble.
*** zle_refresh.c.~3~ Sun Nov 10 16:01:03 1996
--- zle_refresh.c Wed Nov 13 23:50:34 1996
***************
*** 596,614 ****
if (nbuf[vln] && *nbuf[vln])
zputc(*nbuf[vln], shout);
else
! zputc(' ', shout); /* I don't think this should happen */
! nl++;
! if (*ol)
! ol++;
! ccs = 1;
}
/* 2c: if we're on the first line, start checking at the end of the prompt;
we shouldn't be doing anything within the prompt */
if (ln == 0 && pptw) {
! nl += (pptw - ccs);
! ol += (pptw - ccs);
ccs = pptw;
}
--- 596,618 ----
if (nbuf[vln] && *nbuf[vln])
zputc(*nbuf[vln], shout);
else
! zputc(' ', shout); /* I don't think this should happen */
! if (ln == vln) { /* better safe than sorry */
! nl++;
! if (*ol)
! ol++;
! ccs = 1;
! } /* else hmmm... I wonder what happened */
}
/* 2c: if we're on the first line, start checking at the end of the prompt;
we shouldn't be doing anything within the prompt */
if (ln == 0 && pptw) {
! i = pptw - ccs;
! j = strlen(ol);
! nl += i;
! ol += (i > j ? j : i); /* if ol is too short, point it to '\0' */
ccs = pptw;
}
***************
*** 653,659 ****
we can do, so we just dump out what we must and clear if we can */
if (!*ol) {
i = (col_cleareol >= 0) ? col_cleareol : nllen;
! i -= ccs;
zwrite(nl, i, 1, shout);
vcs += i;
if (col_cleareol >= 0)
--- 657,663 ----
we can do, so we just dump out what we must and clear if we can */
if (!*ol) {
i = (col_cleareol >= 0) ? col_cleareol : nllen;
! i -= vcs;
zwrite(nl, i, 1, shout);
vcs += i;
if (col_cleareol >= 0)
--
Geoff Wing [gwing@xxxxxxxxxxxxxxx] Technical Manager
Phone : +61-3-9818 2977 PrimeNet - Internet Consultancy
Facsimile: +61-3-9819 3788 Web : <URL:http://www.primenet.com.au/>
Mobile : 0412 162 441
Messages sorted by:
Reverse Date,
Date,
Thread,
Author