From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id OAA26991 for ; Fri, 29 Mar 1996 14:55:48 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id WAA28694; Thu, 28 Mar 1996 22:43:56 -0500 (EST) Resent-Date: Thu, 28 Mar 1996 22:43:56 -0500 (EST) From: mason@werple.net.au Message-Id: <199603290342.OAA00500@werple.net.au> Subject: one more tiny zle_refresh.c patch To: zsh-workers@math.gatech.edu (zsh-list) Date: Fri, 29 Mar 1996 14:42:42 +1100 (EST) X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"VZ-TK1.0.D07.xnrMn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/868 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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@werple.mira.net.au "Hurt...Agony...Pain...LOVE-IT"