Skip to content

Commit

Permalink
history-substring-search: bindkey now checks if terminfo is available…
Browse files Browse the repository at this point in the history
… first.
  • Loading branch information
FlorianFranzen committed Mar 24, 2014
1 parent c563fe9 commit 5303793
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/history-substring-search/history-substring-search.zsh
Expand Up @@ -164,8 +164,12 @@ zle -N history-substring-search-up
zle -N history-substring-search-down

zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
if [[ -n "$terminfo[kcuu1]" ]]; then
bindkey "$terminfo[kcuu1]" history-substring-search-up
fi
if [[ -n "$terminfo[kcud1]" ]]; then
bindkey "$terminfo[kcud1]" history-substring-search-down
fi

#-----------------------------------------------------------------------------
# implementation details
Expand Down

0 comments on commit 5303793

Please sign in to comment.