zsh-workers
 help / color / mirror / code / Atom feed
From: David Bitseff <bitsed@gmail.com>
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	[thread overview]
Message-ID: <201101090911.07314.bitsed@gmail.com> (raw)

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;


             reply	other threads:[~2011-01-09 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-09 17:11 David Bitseff [this message]
2011-01-09 21:09 ` Peter Stephenson
2011-01-09 23:58   ` Bart Schaefer
2011-01-10  9:42     ` Peter Stephenson
2011-01-10  1:44   ` David Bitseff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201101090911.07314.bitsed@gmail.com \
    --to=bitsed@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).