From be947a560657f46438bb5f0c40cc0ac8cda6e2ec Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 28 Apr 2008 10:56:42 +0000 Subject: 24890: Matt Wozniski: reset skip_pos on backtracking in isearch --- Src/Zle/zle_hist.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'Src/Zle/zle_hist.c') 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); -- cgit 1.4.1