Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

… first.
  • Loading branch information...
commit 5303793ef13b5dd3e7f52ac40f17fd37f015af44 1 parent c563fe9
Florian Franzen FloFra authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 plugins/history-substring-search/history-substring-search.zsh
8 plugins/history-substring-search/history-substring-search.zsh
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.