aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-01-31 03:55:35 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-01-31 03:55:35 +0000
commit225487bf41cca8b946169135f2e29f20f8f1f590 (patch)
treeaca07bf6fbef1bc0ee53fd9ea6faad34ad1f0398 /main.c
parent[w3m-dev 02942] Digest qop=auth support (diff)
downloadw3m-225487bf41cca8b946169135f2e29f20f8f1f590.tar.gz
w3m-225487bf41cca8b946169135f2e29f20f8f1f590.zip
[w3m-dev 02946] toggle migemo
* fm.h (migemo_active): added * proto.h (inputLineHistSearch): add arg `prop' to incrfunc() * linein.c (inputLineHistSearch): ditto * main.c (isrch): ditto * main.c (dispincsrch): ditto C-\ toggle migemo underline when migemo is active * search.c (migemo_active): deleted * search.c (migemo_running): added * search.c (init_migemo): migemo_running * search.c (migemostr): ditto * search.c (forwardSearch): migemo_active > 0 * search.c (backwardSearch): ditto From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to '')
-rw-r--r--main.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/main.c b/main.c
index 627d89f..fcebbce 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.74 2002/01/30 15:08:48 ukai Exp $ */
+/* $Id: main.c,v 1.75 2002/01/31 03:55:35 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -1401,7 +1401,7 @@ disp_srchresult(int result, char *prompt, char *str)
}
static int
-dispincsrch(int ch, Str buf)
+dispincsrch(int ch, Str buf, Lineprop *prop)
{
static Buffer sbuf;
static Line *currentLine;
@@ -1426,6 +1426,11 @@ dispincsrch(int ch, Str buf)
searchRoutine = forwardSearch;
do_next_search = TRUE;
break;
+
+ case 034:
+ migemo_active = -migemo_active;
+ goto done;
+
default:
if (ch >= 0)
return ch; /* use InputKeymap */
@@ -1459,6 +1464,16 @@ dispincsrch(int ch, Str buf)
}
displayBuffer(Currentbuf, B_FORCE_REDRAW);
clear_mark(Currentbuf->currentLine);
+ done:
+ {
+ int i;
+ for (i = 0; str[i] != '\0'; i++) {
+ if (migemo_active > 0)
+ prop[i] |= PE_UNDER;
+ else
+ prop[i] &= ~PE_UNDER;
+ }
+ }
return -1;
}
@@ -1468,7 +1483,7 @@ isrch(int (*func) (Buffer *, char *), char *prompt)
char *str;
Buffer sbuf;
SAVE_BUFPOSITION(&sbuf);
- dispincsrch(0, NULL); /* initialize incremental search state */
+ dispincsrch(0, NULL, NULL); /* initialize incremental search state */
searchRoutine = func;
str = inputLineHistSearch(prompt, NULL, IN_STRING, TextHist, dispincsrch);