From ced1a5b3e1260e0e448f2ed6a7e91956ffeebd71 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Mon, 11 Aug 2014 21:33:33 +0200 Subject: zsh/keybindings: Enable application mode for zle --- zsh/keybindings.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'zsh/keybindings.zsh') diff --git a/zsh/keybindings.zsh b/zsh/keybindings.zsh index cf22513..bfaaa9b 100644 --- a/zsh/keybindings.zsh +++ b/zsh/keybindings.zsh @@ -2,6 +2,18 @@ # Keybindings # + +# Make sure the terminal is in application mode when zle is active. Only then +# are the values from $terminfo valid. +function zle-line-init () { + printf '%s' "${terminfo[smkx]}" +} +function zle-line-finish () { + printf '%s' "${terminfo[rmkx]}" +} +zle -N zle-line-init +zle -N zle-line-finish + bindkey -v # Shift-tab -- cgit v1.2.3-54-g00ecf