about summary refs log tree commit diff
path: root/Src/Zle/zle_hist.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-28 10:56:42 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-28 10:56:42 +0000
commitbe947a560657f46438bb5f0c40cc0ac8cda6e2ec (patch)
treeed20df83eb44e694af90da06214b44150d806f69 /Src/Zle/zle_hist.c
parent0c0213b5175df7559e8e9f89cbb0a6bf3dd08da9 (diff)
downloadzsh-be947a560657f46438bb5f0c40cc0ac8cda6e2ec.tar.gz
zsh-be947a560657f46438bb5f0c40cc0ac8cda6e2ec.tar.xz
zsh-be947a560657f46438bb5f0c40cc0ac8cda6e2ec.zip
24890: Matt Wozniski: reset skip_pos on backtracking in isearch
Diffstat (limited to 'Src/Zle/zle_hist.c')
-rw-r--r--Src/Zle/zle_hist.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index bc0598327..bc3cdf634 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -1442,20 +1442,21 @@ doisearch(char **args, int dir, int pattern)
 	    if(selectkeymap(invicmdmode() ? "main" : "vicmd", 0))
 		feep = 1;
 	    goto ref;
-	} else if(cmd == Th(z_vibackwarddeletechar) ||
-	    	cmd == Th(z_backwarddeletechar)) {
-	    if (top_spot) {
-		get_isrch_spot(--top_spot, &hl, &pos, &pat_hl, &pat_pos,
-			       &end_pos, &zlemetacs, &sbptr, &dir, &nomatch);
-		patprog = NULL;
-		nosearch = 1;
-	    } else
-		feep = 1;
-	    if (nomatch) {
-		memcpy(ibuf, nomatch == 2 ? INVALID_TEXT : FAILING_TEXT,
-		       BAD_TEXT_LEN);
-		statusline = ibuf;
-		skip_pos = 1;
+       } else if(cmd == Th(z_vibackwarddeletechar) ||
+               cmd == Th(z_backwarddeletechar)) {
+           if (top_spot) {
+               get_isrch_spot(--top_spot, &hl, &pos, &pat_hl, &pat_pos,
+                              &end_pos, &zlemetacs, &sbptr, &dir, &nomatch);
+               patprog = NULL;
+               nosearch = 1;
+               skip_pos = 0;
+           } else
+               feep = 1;
+           if (nomatch) {
+               memcpy(ibuf, nomatch == 2 ? INVALID_TEXT : FAILING_TEXT,
+                      BAD_TEXT_LEN);
+               statusline = ibuf;
+               skip_pos = 1;
 	    }
 	    he = quietgethist(hl);
 	    zt = GETZLETEXT(he);