summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2015-02-10 11:20:42 -0800
committerRobby Russell <robby@planetargon.com>2015-02-10 11:20:42 -0800
commit49b4e675e05e4383f1eb229b1cd0e7401c9a25ec (patch)
tree11cec71228c9de0133c9c919a00523ae98ac6066
parent0a0a27857e7811b77c35361c759bb566255108db (diff)
parent7de44dbdb767e52e509010b1468126259e0b8b87 (diff)
downloadzsh-49b4e675e05e4383f1eb229b1cd0e7401c9a25ec.tar.gz
zsh-49b4e675e05e4383f1eb229b1cd0e7401c9a25ec.tar.bz2
zsh-49b4e675e05e4383f1eb229b1cd0e7401c9a25ec.zip
Merge pull request #3547 from martong/vi_mode_trapwinch
Added trapwinch to vi-mode plugin.
-rw-r--r--plugins/vi-mode/vi-mode.plugin.zsh8
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