about summary refs log tree commit diff
path: root/Src/Zle/zle_keymap.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-01-28 09:31:53 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-01-28 09:31:53 +0000
commitaf39a5ab1a4f0b154ac212fdeb86bad322b32056 (patch)
tree45a825b359c708c6acfec4f4c037a8beea2b6436 /Src/Zle/zle_keymap.c
parent7c43fb69bf81dd37c0743a761c6b43519ea9a0d0 (diff)
downloadzsh-af39a5ab1a4f0b154ac212fdeb86bad322b32056.tar.gz
zsh-af39a5ab1a4f0b154ac212fdeb86bad322b32056.tar.xz
zsh-af39a5ab1a4f0b154ac212fdeb86bad322b32056.zip
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
Diffstat (limited to 'Src/Zle/zle_keymap.c')
-rw-r--r--Src/Zle/zle_keymap.c15
1 files changed, 11 insertions, 4 deletions
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);
 }
 
 /*************************/