From 1da6898ac64422534a4fb3fbadf5f3e0a60442f8 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Fri, 2 May 2003 15:49:59 +0000 Subject: [w3m-dev 03887] Re: I-search problem * main.c (dispincsrch): don't move cursor if not found. From: Hiroyuki Ito --- main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'main.c') 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 @@ -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); -- cgit v1.2.3