From f4d9b32de94c2ead323339d4be8b3e25b7e86181 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 29 Jan 2013 14:13:14 -0500 Subject: [PATCH] [Fix #351] Set empty keys to an invalid UTF-8 sequence --- modules/editor/init.zsh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/editor/init.zsh b/modules/editor/init.zsh index ae253f2..d76c605 100644 --- a/modules/editor/init.zsh +++ b/modules/editor/init.zsh @@ -90,12 +90,11 @@ key_info=( 'BackTab' "$terminfo[kcbt]" ) -# Do not bind any keys if there are empty values in $key_info. +# Set empty $key_info values to an invalid UTF-8 sequence to induce silent +# bindkey failure. for key in "${(k)key_info[@]}"; do if [[ -z "$key_info[$key]" ]]; then - print "prezto: one or more keys are non-bindable" >&2 - unset key{,_info} - return 1 + key_info["$key"]='�' fi done