Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: .safe keymap doesn't use builtin widgets?
- X-seq: zsh-workers 38463
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: .safe keymap doesn't use builtin widgets?
- Date: Tue, 10 May 2016 11:00:03 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=IRBYKvw9GRXUeW+RyrJObd2cSxC3nQVYnamEDXF1XP8=; b=ofn+ZOG2cgRhFbUVdXE1eYMc91x1SAUzUrF7NzP12HR8fkWvjjmnp4MTK4NSUe4Ft7 v8xS6PkzTcDHXle8TclmTN758gbJtbScbHSLqgYvEiRXSQG8Xw3uHb8HIIlzLUw84Byd 3sMNqSPtsfbkYuaz0iE0iCFbIeBkmBpLH5LhcUd7JrlvK3QE9XYAQ6yTUCj9RSp3OzKd K/qvwyUOAhoIrE8NlJoOB1qTPZvHckzSL09aMyzBNM9mD63RlF4IkwV6RPeEJEbLslKG 9MiQu2XI+s1uO7AKhhj2cJQNlC1vZ7tY/FvzEuiTrZM56azCJMOcIAETmgXOA38EnyWa LD/A==
- In-reply-to: <20160509221743.GA16416@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20160509221743.GA16416@tarsus.local2>
On May 9, 10:17pm, Daniel Shahaf wrote:
}
} Shouldn't it use the dot-prefixed versions of self-insert and
} accept-line [...]
}
} ?
The immutable keymap and the immortal widgets were invented at different
times, so this was probably just overlooked when setting things up.
Fortunately it's pretty easy to change, and makes sense.
diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index 13fd138..f547dbf 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -1322,15 +1322,15 @@ default_bindings(void)
amap->first[i] = refthingy(t_undefinedkey);
/* safe fallback keymap:
- * 0-255 self-insert, except: *
- * '\n' accept-line *
- * '\r' accept-line */
+ * 0-255 .self-insert, except: *
+ * '\n' .accept-line *
+ * '\r' .accept-line */
for (i = 0; i < 256; i++)
- smap->first[i] = refthingy(t_selfinsert);
- unrefthingy(t_selfinsert);
- unrefthingy(t_selfinsert);
- smap->first['\n'] = refthingy(t_acceptline);
- smap->first['\r'] = refthingy(t_acceptline);
+ smap->first[i] = refthingy(t_Dselfinsert);
+ unrefthingy(t_Dselfinsert);
+ unrefthingy(t_Dselfinsert);
+ smap->first['\n'] = refthingy(t_Dacceptline);
+ smap->first['\r'] = refthingy(t_Dacceptline);
/* vt100 arrow keys are bound by default, for historical reasons. *
* Both standard and keypad modes are supported. */
Messages sorted by:
Reverse Date,
Date,
Thread,
Author