diff options
author | Gabor Marton <gabor.marton@prezi.com> | 2015-02-04 12:56:58 +0100 |
---|---|---|
committer | Gabor Marton <gabor.marton@prezi.com> | 2015-02-04 12:56:58 +0100 |
commit | 7de44dbdb767e52e509010b1468126259e0b8b87 (patch) | |
tree | 4b6097c220cfbc356b4bcff04905b032c00ed2a7 /plugins/vi-mode | |
parent | 550ccca91cb45fcf26a8f2c3c60da675b995e3f3 (diff) | |
download | zsh-7de44dbdb767e52e509010b1468126259e0b8b87.tar.gz zsh-7de44dbdb767e52e509010b1468126259e0b8b87.tar.bz2 zsh-7de44dbdb767e52e509010b1468126259e0b8b87.zip |
Added trapwinch to vi-mode plugin.
Diffstat (limited to 'plugins/vi-mode')
-rw-r--r-- | plugins/vi-mode/vi-mode.plugin.zsh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index 3ed32b3fb..f2745b409 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -14,6 +14,14 @@ function zle-keymap-select zle-line-init zle-line-finish { zle -R } +# Ensure that the prompt is redrawn when the terminal size changes. +TRAPWINCH() { + if [[ -o zle ]]; then + zle reset-prompt + zle -R + fi +} + zle -N zle-line-init zle -N zle-line-finish zle -N zle-keymap-select |