From 46cdeb71b7c8dae7517ef832130049dc1e821cb6 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 19 Jan 2009 17:57:43 +0000 Subject: 26366: add "isearch" keymap and "accept-search" functino --- Src/Zle/zle_hist.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Src/Zle/zle_hist.c') diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index c4dad7617..aec847ec6 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -49,6 +49,10 @@ ZLE_STRING_T previous_search = NULL; /**/ int previous_search_len = 0; +/* Local keymap in isearch mode */ + +/**/ +Keymap isearch_keymap; /*** History text manipulation utilities ***/ @@ -1141,6 +1145,8 @@ doisearch(char **args, int dir, int pattern) if (!(he = quietgethist(hl))) return; + selectlocalmap(isearch_keymap); + clearlist = 1; if (*args) { @@ -1572,6 +1578,8 @@ doisearch(char **args, int dir, int pattern) feep = 1; else goto ins; + } else if (cmd == Th(z_acceptsearch)) { + break; } else { if(cmd == Th(z_selfinsertunmeta)) { fixunmeta(); @@ -1640,6 +1648,8 @@ doisearch(char **args, int dir, int pattern) */ if (savekeys >= 0 && kungetct > savekeys) kungetct = savekeys; + + selectlocalmap(NULL); } static Histent -- cgit 1.4.1