浏览代码

fix(sudo): only call redisplay if zle is enabled

Fixes #11322
Carlo Sala 1 年之前
父节点
当前提交
f8bf8f0029
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/sudo/sudo.plugin.zsh

+ 1 - 1
plugins/sudo/sudo.plugin.zsh

@@ -96,7 +96,7 @@ sudo-command-line() {
     LBUFFER="${WHITESPACE}${LBUFFER}"
     LBUFFER="${WHITESPACE}${LBUFFER}"
 
 
     # Redisplay edit buffer (compatibility with zsh-syntax-highlighting)
     # Redisplay edit buffer (compatibility with zsh-syntax-highlighting)
-    zle redisplay
+    zle && zle redisplay # only run redisplay if zle is enabled
   }
   }
 }
 }