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

one more tiny zle_refresh.c patch



Heyla,
   while my previous patch (message 867) did provide a solution in 99.9999999%
 of the cases, there is logically one (obscure) bug which noone will ever, ever
 come across, but...  Anyway, the most elegant solution to the problem happens
 to be very similar to the original quick & dirty hack I thought of but didn't
 want to use - ah, well, you can't win them all.  
And we hope rc's still alive and bringing us 2.6.14 soon.

This goes on top of 867.
seeya, 
 Geoff  (trying to make zle_refresh 100% robust).


*** zle_refresh.c.~6~	Fri Mar 29 00:52:08 1996
--- zle_refresh.c	Fri Mar 29 14:04:47 1996
***************
*** 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
--- 541,548 ----
  	    return;
  	}
  
!     /* inserting & deleting chars: we can if there's no right-prompt */
! 	if ((ln || !put_rpmpt || !oput_rpmpt)) {
  
  	/* deleting characters - see if we can find a match series that
  	   makes it cheaper to delete intermediate characters
***************
*** 611,616 ****
--- 608,615 ----
  	    else
  		putc(' ', shout);
  	    putc('\r', shout);
+ 	    if ((vln < olnct) && obuf[vln] && *obuf[vln])
+ 		*obuf[vln] = *nbuf[vln];
  	}
  	SELECT_ADD_COST(2);
      }



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




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