From af39a5ab1a4f0b154ac212fdeb86bad322b32056 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 28 Jan 2009 09:31:53 +0000 Subject: 26463: Greg Klanderman: add zle-line-finish widget 26464: Greg Klanderman: fix insert-ids=single for menu completion 26465: Greg Klanderman: command keymap for execution --- Src/Zle/zle_keymap.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'Src/Zle/zle_keymap.c') diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c index 30c747900..7f59d9d9b 100644 --- a/Src/Zle/zle_keymap.c +++ b/Src/Zle/zle_keymap.c @@ -1176,8 +1176,6 @@ default_bindings(void) char buf[3], *ed; int i; - isearch_keymap = newkeymap(NULL, "isearch"); - /* vi insert mode and emacs mode: * * 0-31 taken from the tables * * 32-126 self-insert * @@ -1276,10 +1274,19 @@ default_bindings(void) else linkkeymap(emap, "main", 0); - linkkeymap(isearch_keymap, "isearch", 0); - /* the .safe map cannot be modified or deleted */ smap->flags |= KM_IMMUTABLE; + + /* isearch keymap: initially empty */ + isearch_keymap = newkeymap(NULL, "isearch"); + linkkeymap(isearch_keymap, "isearch", 0); + + /* command keymap: make sure accept-line and send-break are bound */ + command_keymap = newkeymap(NULL, "command"); + command_keymap->first['\n'] = refthingy(t_acceptline); + command_keymap->first['\r'] = refthingy(t_acceptline); + command_keymap->first['G'&0x1F] = refthingy(t_sendbreak); + linkkeymap(command_keymap, "command", 0); } /*************************/ -- cgit 1.4.1