aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAIDA Shinra <shinra@j10n.org>2013-12-07 01:32:58 +0000
committerTatsuya Kinoshita <tats@debian.org>2013-12-07 01:32:58 +0000
commitb5641f56cecfa1c231abfc5d9390de768f2e9120 (patch)
treea7dbbbcf01fd85def31d2a9480a3c8dffc798ec0
parentMerge from upstream on 2012-05-22 (diff)
downloadw3m-b5641f56cecfa1c231abfc5d9390de768f2e9120.tar.gz
w3m-b5641f56cecfa1c231abfc5d9390de768f2e9120.zip
Fix crash after SEARCH_NEXT
Patch from <http://www.j10n.org/files/w3m-cvs-1.1055-search-next.patch>, [w3m-dev:04473] on 2013-12-07.
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
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);