From bbcee91527ba3e0163b55a6e1bdca44f9239fbcf Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 27 Apr 2008 20:01:49 +0000 Subject: 24886: fix endless loop in string isearch --- Src/Zle/zle_hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src/Zle/zle_hist.c') diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index 203492b55..bc0598327 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -1323,7 +1323,7 @@ doisearch(char **args, int dir, int pattern) } else t = zlinefind(zt, pos, sbuf, dir, sens); if (t) - end_pos = pos + sbptr - (sbuf[0] == '^'); + end_pos = (t - zt) + sbptr - (sbuf[0] == '^'); } } if (t) { -- cgit 1.4.1