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 UAA26132 for ; Thu, 28 Mar 1996 20:56:33 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA19523; Thu, 28 Mar 1996 04:35:57 -0500 (EST) Resent-Date: Thu, 28 Mar 1996 04:35:57 -0500 (EST) From: mason@werple.net.au Message-Id: <199603280934.UAA08925@werple.net.au> Subject: Re: Still there's a little zle_refresh bug To: zsh-workers@math.gatech.edu (zsh-list) Date: Thu, 28 Mar 1996 20:34:54 +1100 (EST) In-Reply-To: <199603280843.TAA08035@werple.net.au> from "mason@werple.net.au" at Mar 28, 96 07:43:37 pm 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: <"-3eQw3.0.zm4.yrbMn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/867 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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@werple.mira.net.au "Hurt...Agony...Pain...LOVE-IT"