mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 20:29:45 +01:00
Make sure the terminal is always in application mode when zle is active.
This commit is contained in:
parent
3839c6e9e6
commit
ff0cafa14d
1 changed files with 13 additions and 0 deletions
|
@ -2,6 +2,19 @@
|
|||
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins
|
||||
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Standard-Widgets
|
||||
|
||||
# Make sure that the terminal is in application mode when zle is active, since
|
||||
# only then values from $terminfo are valid
|
||||
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
|
||||
function zle-line-init() {
|
||||
echoti smkx
|
||||
}
|
||||
function zle-line-finish() {
|
||||
echoti rmkx
|
||||
}
|
||||
zle -N zle-line-init
|
||||
zle -N zle-line-finish
|
||||
fi
|
||||
|
||||
bindkey -e # Use emacs key bindings
|
||||
|
||||
bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark
|
||||
|
|
Loading…
Reference in a new issue