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

Re: Still there's a little zle_refresh bug



I wrote:
:I just worked out the logic of the bug and I'll post a patch for this in a 
:few hours.  The problem was on the second line: at the start, the first char
:'0' then '\r' got printed due to automargin stuff, then an insert char,
:then '0' to fill the blank spot - when the code was originally written
:there would not have been the first char '0' written.  There's an obvious hack
:in the code here, but for other reasons I don't want to do that, so I'll write
:a nice complex, hard-to-understand patch for it instead :-)

You won't have to wait a couple of hours.  I came up with another way to fix
this which is fairly easy to understand (damn!).  People will have to put up
with getting an extra two characters outputted in these situations (probably
increase the output to the terminal by around 0.001% during most sessions).
Hopefully won't matter that much, as the previous patches I sent decreased it
by slightly more.

This goes on top of patches from 820 & 831.

*** zle_refresh.c.~4~	Thu Mar 28 20:14:22 1996
--- zle_refresh.c	Thu Mar 28 21:22:50 1996
***************
*** 541,549 ****
  	    return;
  	}
  
!     /* if there's no right-prompt,
!        see whether we can insert or delete characters */
! 	if (ln || !put_rpmpt || !oput_rpmpt) {
  
  	/* deleting characters - see if we can find a match series that
  	   makes it cheaper to delete intermediate characters
--- 541,551 ----
  	    return;
  	}
  
!     /* inserting & deleting characters: we're allowed to if there's no
!        right-prompt, and we're not in the one situation where the screen
!        display isn't `guaranteed' to match ol */
! 	if ((ln || !put_rpmpt || !oput_rpmpt)
! 	    && !((ccs == 0) && hasam && ln)) {
  
  	/* deleting characters - see if we can find a match series that
  	   makes it cheaper to delete intermediate characters



-- 
Mason [G.C.W]  mason@xxxxxxxxxxxxxxxxxx    "Hurt...Agony...Pain...LOVE-IT"




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