about summary refs log tree commit diff
path: root/Src/Zle/zle_keymap.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-11-03 17:03:37 +0000
committerPeter Stephenson <pws@zsh.org>2016-11-03 17:03:37 +0000
commit533d839384492fcdf851a94f597c989491d9b361 (patch)
tree8c82df92911edf959021bc19c48c482a23664197 /Src/Zle/zle_keymap.c
parent9d460a9d7f68169d0de4bba77ac8890c2664abcb (diff)
downloadzsh-533d839384492fcdf851a94f597c989491d9b361.tar.gz
zsh-533d839384492fcdf851a94f597c989491d9b361.tar.xz
zsh-533d839384492fcdf851a94f597c989491d9b361.zip
unposted: comment explaining key buffer handling.
Describe putting back the tail end of the key buffer into
the input.
Diffstat (limited to 'Src/Zle/zle_keymap.c')
-rw-r--r--Src/Zle/zle_keymap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index 34c9c686e..053b097bb 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -1621,6 +1621,13 @@ getkeymapcmd(Keymap km, Thingy *funcp, char **strp)
     else
 	lastchar = lastc;
     if(lastlen != keybuflen) {
+	/*
+	 * We want to keep only the first lastlen bytes of the key
+	 * buffer in the key buffer that were marked as used by the key
+	 * binding above, and make the rest available for input again.
+	 * That rest (but not what we are keeping) needs to be
+	 * unmetafied.
+	 */
 	unmetafy(keybuf + lastlen, &keybuflen);
 	ungetbytes(keybuf+lastlen, keybuflen);
 	if(vichgflag)