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 RAA10749 for ; Wed, 3 Apr 1996 17:12:23 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id BAA13406; Wed, 3 Apr 1996 01:50:32 -0500 (EST) Resent-Date: Wed, 3 Apr 1996 01:50:32 -0500 (EST) From: Zefram Message-Id: <22837.199604030649@stone.dcs.warwick.ac.uk> Subject: Re: zsh v 2.6-beta13 bug (fwd) To: mason@werple.net.au Date: Wed, 3 Apr 1996 07:49:08 +0100 (BST) Cc: zsh-workers@math.gatech.edu (Z Shell workers mailing list) In-Reply-To: <199604020159.LAA14712@werple.net.au> from "mason@werple.net.au" at Apr 2, 96 11:59:39 am X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]7296.42 X-US-Congress: Moronic fuckers MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"Tw5Q_.0.OH3.t-XOn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/889 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >In viswapmode(), cs was being set to -1 (cs should always be >= 0) I already fixed that and sent a patch to the list. > should >probably put a sanity check for this in zle_refresh.c but it may obscure >other bugs. Don't. The unusual cursor position is a useful clue that something's broken -- that the cursor has somehow got outside the buffer. That's how I found the ~-on-an-empty-line bug: on my Linux box I occasionally accidentally hit a function key that sent a sequence ^[13~ (not sure of the number). On second thoughts, you could put in a sanity check and still have the current bug highlighting by adding an error message output as well as putting the cursor within the buffer. But this would take more extra code than is likely worthwhile for a `can't happen' condition. >:Additionally, on HP, after doing that, I can sometimes crash zsh, if I do: >:1. '~' (as described above) >:2. 'j' 'k' 'j' 'k'... (until there's a beep) With the cursor off the end of the buffer, there's undefined behaviour of a particularly undefined variety. I'm not surprised it crashes. -zefram