[history-substring-search] Fix incompatibility with zle-line-init widget
See https://github.com/zsh-users/zsh-history-substring-search/issues/70 and comment by @molovo: I was already binding keys _after_ `zle-line-init`, but I'm pulling keycodes out of the `terminfo` module, which reports up (`$terminfo[kcuu1]`) as `^[0A` instead of `^[[A`. Binding `^[[A` manually mean up/down works with history-substring-search both before and after `zle-line-init`, but if I bind `$terminfo[kcuu1]` (`^[0a`), up/down only works *before* `zle-line-init`. Closes #286
This commit is contained in:
parent
c9d1be395d
commit
fe2cb6b9f5
1 changed files with 3 additions and 4 deletions
|
@ -5,7 +5,6 @@
|
|||
# Source script
|
||||
source ${0:h}/external/zsh-history-substring-search.zsh || return 1
|
||||
|
||||
# Bind up and down keys
|
||||
zmodload -F zsh/terminfo +p:terminfo
|
||||
bindkey "${terminfo[kcuu1]}" history-substring-search-up
|
||||
bindkey "${terminfo[kcud1]}" history-substring-search-down
|
||||
# Binding ^[[A/^[[B manually mean up/down works with history-substring-search both before and after zle-line-init
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
|
Loading…
Reference in a new issue