d7837c6041b1099982e3f278b50e8868b8b30ff9
- Author
- Brian Derr <brian@derrclan.com>
- Committer
- Brian Derr <brian@derrclan.com>
- Date
Message
Shorten the zle check and reset-prompt into one line.
Diff
1diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
2index ac9233290607f0010570385c5791fa6eef738654..80df97d6144e1dc97561dc8c3d8906a4b0b82e82 100644
3--- a/plugins/vi-mode/vi-mode.plugin.zsh
4+++ b/plugins/vi-mode/vi-mode.plugin.zsh
5@@ -16,14 +16,7 @@ function zle-keymap-select zle-line-init zle-line-finish {
6
7 # Ensure that the prompt is redrawn when the terminal size changes.
8 TRAPWINCH() {
9- if [[ -o zle ]]; then
10- # Verify that zle is active before trying to reset-prompt.
11- zle
12- if [[ $? -eq 0 ]]; then
13- zle reset-prompt
14- zle -R
15- fi
16- fi
17+ zle && { zle reset-prompt; zle -R }
18 }
19
20 zle -N zle-line-init