Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: fix vi-goto-mark to allow jumps to the last mark
- X-seq: zsh-workers 28607
- From: David Bitseff <bitsed@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: fix vi-goto-mark to allow jumps to the last mark
- Date: Sun, 9 Jan 2011 09:11:07 -0800
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author