Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Multi-line update problem in zholi10.1



Wayne Davison wrote:
> 
> There's a problem in zholi10.1 where it will not update the screen
> correctly when inserting characters into the first line of a multi-
> line command.  You have to be using an auto-margin terminal with
> character insert (in my case I'm using an xterm), to see the problem.
> 
> The code that is failing is in refreshline() where it checks if there
> is some space at the end of the line that needs to be cleared.
> Because it is checking the wrong variable (vcs instead of ccs) it
> uses right-cursor to try to move to column 80 (one past the right
> edge) which is not possible -- you can only get to column 80 in a
> terminal like a vt100 by outputing a character in column 79.  This
> causes the moveto() code to fail to advance to the next line, and
> then the screen becomes really messed up.
> 
> I've appended a patch that fixes this problem.  It is possible that
> with this fix the following check for i == 0 isn't needed:
> 
>     /* we've written out the new but yet to clear rubbish due to inserts */
>         if (!*nl) {
>             if ((i = (winw - ccs < char_ins ? winnw - ccs : char_ins)) == 0)
>                 return;
> 
> but I don't know the code well enough to know for sure.

I also noticed this bug but I had no time to debug it. This bug was introduced
by the patch from Geoff Wing (art. 164).  So this patch together with Geoff's
patches shoud go into the baseline as well. Thank you for fixing that.  Geoff
could probably answer your question here.

Zoltan



Messages sorted by: Reverse Date, Date, Thread, Author