From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28363 invoked by alias); 9 Jan 2011 18:02:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28607 Received: (qmail 10315 invoked from network); 9 Jan 2011 18:02:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1 Received-SPF: neutral (ns1.primenet.com.au: 209.221.136.9 is neither permitted nor denied by SPF record at _spf.google.com) From: David Bitseff To: zsh-workers@zsh.org Subject: PATCH: fix vi-goto-mark to allow jumps to the last mark Date: Sun, 9 Jan 2011 09:11:07 -0800 User-Agent: KMail/1.13.5 (Linux/2.6.36.3; KDE/4.5.4; x86_64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201101090911.07314.bitsed@gmail.com> I've noticed that the vi-goto-mark zle widget doesn't work as expected on my system. If I try jumping to a mark that I just set using the vi-set-mark widget there is no movement of the cursor. To replicate the problem: 1) use vi-up-line-or-history to recall a suitably long command 2) use vi-forward-char a few times to move the cursor a bit 3) set a mark using vi-set-mark 4) use vi-forward-char a few times to move the cursor some more 5) try jumping to the mark just created using vi-goto-mark 6) notice no cursor movement The patch below appears to solve the problem. diff --git a/Src/Zle/zle_move.c b/Src/Zle/zle_move.c index f15b114..32ed76d 100644 --- a/Src/Zle/zle_move.c +++ b/Src/Zle/zle_move.c @@ -807,7 +807,7 @@ vigotomark(UNUSED(char **args)) ch = getfullchar(0); if (ch == lfc) - ch = 26; + ch -= ZWC('a'); else { if (ch < ZWC('a') || ch > ZWC('z')) return 1;