history-substring-search: bindkey now checks if terminfo is available first.

This commit is contained in:
Florian Franzen 2014-03-24 22:32:56 +01:00
parent c563fe95fb
commit 5303793ef1

View File

@ -164,8 +164,12 @@ zle -N history-substring-search-up
zle -N history-substring-search-down zle -N history-substring-search-down
zmodload zsh/terminfo zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up if [[ -n "$terminfo[kcuu1]" ]]; then
bindkey "$terminfo[kcud1]" history-substring-search-down bindkey "$terminfo[kcuu1]" history-substring-search-up
fi
if [[ -n "$terminfo[kcud1]" ]]; then
bindkey "$terminfo[kcud1]" history-substring-search-down
fi
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# implementation details # implementation details