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 QAA06479 for ; Tue, 2 Apr 1996 16:00:19 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id AAA00462; Tue, 2 Apr 1996 00:33:25 -0500 (EST) Resent-Date: Tue, 2 Apr 1996 00:33:25 -0500 (EST) From: mason@werple.net.au Message-Id: <199604020159.LAA14712@werple.net.au> Subject: zsh v 2.6-beta13 bug (fwd) To: zsh-workers@math.gatech.edu (zsh-list) Date: Tue, 2 Apr 1996 11:59:39 +1000 (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: <"ruLqS3.0.67.amBOn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/888 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu :On: : HP-UX A.09.01 A 9000/715 : IRIX 5.3 IP22 mips : SunOS 5.4 sun4d sparc :In 'bindkey -v' mode, if I do the '~' command on an empty line, :the cursor moves up to the first cursor of the line before the current :line. Instead, nothing should happen. In viswapmode(), cs was being set to -1 (cs should always be >= 0) - should probably put a sanity check for this in zle_refresh.c but it may obscure other bugs. :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) ?? You shouldn't get a beep on this sequence except when at the beginning/end of your history list and the beep will be on the first 'k'/'j'. So I assume you mean lots of 'j's and 'k's until there's a beep (?) :3. 'a' (add) ' ' (any character) (a '^Q' suddenly appears on the command line) :4. -'c' (break) :zsh: 13975 bus error zsh -f :On SunOS, after step 4, the shell doesn't crash but instead freezes. Even then, I couldn't replicate this second part on NetBSD. Anyway, this should fix up the first problem. Anyone who knows zle_vi.c more than me (that's everyone), might want to validate this *** zle_vi.c.bak Tue Apr 2 11:42:26 1996 --- zle_vi.c Tue Apr 2 11:42:26 1996 *************** *** 735,740 **** --- 735,742 ---- if (mult < 1) return; eol = findeol(); + if (cs == eol) + return; /* empty buffer */ while (cs < eol && mult--) { if (islower(line[cs])) line[cs] = tuupper(line[cs]); -- Mason [G.C.W] mason@werple.mira.net.au "Hurt...Agony...Pain...LOVE-IT"