Check termcap before putting in application mode
This commit is contained in:
@@ -13,15 +13,17 @@ function zle-line-init zle-keymap-select {
|
|||||||
viins|main) echo -ne "\e[5 q";; # beam
|
viins|main) echo -ne "\e[5 q";; # beam
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Make sure that the terminal is in application mode when zle is active, since
|
# Make sure that the terminal is in application mode when zle is active,
|
||||||
# only then values from $terminfo are valid
|
# since only then values from $terminfo are valid
|
||||||
echoti smkx
|
! (( $+terminfo[smkx] )) || echoti smkx
|
||||||
}
|
}
|
||||||
zle -N zle-line-init
|
zle -N zle-line-init
|
||||||
zle -N zle-keymap-select
|
zle -N zle-keymap-select
|
||||||
|
|
||||||
# See above (echoti smkx)
|
function zle-line-finish {
|
||||||
function zle-line-finish { echoti rmkx; }
|
# See above (echoti smkx)
|
||||||
|
! (( $+terminfo[rmkx] )) || echoti rmkx
|
||||||
|
}
|
||||||
zle -N zle-line-finish
|
zle -N zle-line-finish
|
||||||
|
|
||||||
bindkey '^[h' run-help
|
bindkey '^[h' run-help
|
||||||
|
|||||||
Reference in New Issue
Block a user