aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-05-02 15:49:59 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-05-02 15:49:59 +0000
commit1da6898ac64422534a4fb3fbadf5f3e0a60442f8 (patch)
tree588be09da52d81a784afcb3b0b452afbc0e58bb5 /main.c
parent[w3m-dev 03886] Re: POSTing patch (Re: User-Agent for Bonus/2ch.cgi) (diff)
downloadw3m-1da6898ac64422534a4fb3fbadf5f3e0a60442f8.tar.gz
w3m-1da6898ac64422534a4fb3fbadf5f3e0a60442f8.zip
[w3m-dev 03887] Re: I-search problem
* main.c (dispincsrch): don't move cursor if not found. From: Hiroyuki Ito <hito@crl.go.jp>
Diffstat (limited to '')
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index ee293c6..efa2284 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.223 2003/04/14 16:19:29 ukai Exp $ */
+/* $Id: main.c,v 1.224 2003/05/02 15:49:59 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -1626,7 +1626,11 @@ dispincsrch(int ch, Str buf, Lineprop *prop)
if (searchRoutine == forwardSearch)
Currentbuf->pos += 1;
SAVE_BUFPOSITION(&sbuf);
- srchcore(str, searchRoutine);
+ if (srchcore(str, searchRoutine) == SR_NOTFOUND
+ && searchRoutine == forwardSearch) {
+ Currentbuf->pos -= 1;
+ SAVE_BUFPOSITION(&sbuf);
+ }
arrangeCursor(Currentbuf);
displayBuffer(Currentbuf, B_FORCE_REDRAW);
clear_mark(Currentbuf->currentLine);