From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id EAA20617 for ; Sun, 24 Nov 1996 04:49:05 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id MAA21862; Sat, 23 Nov 1996 12:42:49 -0500 (EST) Resent-Date: Sat, 23 Nov 1996 12:42:49 -0500 (EST) Message-Id: Subject: Subject: 3.0.1: vi-goto-mark broken To: zsh-workers@math.gatech.edu Date: Sat, 23 Nov 1996 18:48:55 +0100 (MET) From: Thorsten Meinecke Organization: none. Location: Berlin, Germany 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: <"KtiN41.0.WL5.OUpbo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2461 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu In archive/latest/2432, I wrote: > This bug is around a little longer, I've seen it in zsh-3.0.0 too. Actually, it's around since rev 1.1 of zle_move.c, but it was not able do any harm prior to the metafication changes of beta18. > - it either zaps the current buffer (after movement commands) or That is imprecise. vi-goto-mark did only work correct with marks in the current history line, otherwise, there was danger that > - it dumps core when attempting deletions with certain movements > commands. Caused by the variable `ll' getting negative, in forekill(). Which is caused by vifetchhistory() clobbering the value of zmult, which can be prevented by gotmult = 1, which fixes both problems, I think. But then we can have the mark in a deleted portion of a previous histline, off the end of it. Wouldn't it be better to remove the mark and feep() instead of setting the cursor to the end of what's left? Any ideas about the coredumps that are triggered by vi-delete followed by end-of-buffer-or-history? *** zle_move.c 1996/10/15 20:16:35 2.7 --- zle_move.c 1996/11/23 17:43:11 *************** *** 452,463 **** --- 452,466 ---- } if (curhist != vimarkline[ch]) { zmult = vimarkline[ch]; + gotmult = 1; lastcmd |= ZLE_ARG; vifetchhistory(); if (histline != vimarkline[ch]) return; } cs = vimarkcs[ch]; + if (cs > ll) + cs = ll; } /**/