From b5641f56cecfa1c231abfc5d9390de768f2e9120 Mon Sep 17 00:00:00 2001 From: AIDA Shinra Date: Sat, 7 Dec 2013 10:32:58 +0900 Subject: Fix crash after SEARCH_NEXT Patch from , [w3m-dev:04473] on 2013-12-07. --- main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index b421943..04e6eb4 100644 --- a/main.c +++ b/main.c @@ -1844,6 +1844,10 @@ srch_nxtprv(int reverse) result = srchcore(SearchString, routine[reverse]); if (result & SR_FOUND) clear_mark(Currentbuf->currentLine); + else { + if (reverse == 0) + Currentbuf->pos -= 1; + } displayBuffer(Currentbuf, B_NORMAL); disp_srchresult(result, (reverse ? "Backward: " : "Forward: "), SearchString); -- cgit v1.2.3