From 8ed2c78de8d5094f9bc394c6cfd4e4c843420f0e Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Fri, 1 Dec 2017 10:55:54 -0800 Subject: [PATCH] editor: Avoid prompt redisplay on completion when there is no indicator Refs #1512 --- modules/editor/init.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/editor/init.zsh b/modules/editor/init.zsh index 96c8786..ed57a10 100644 --- a/modules/editor/init.zsh +++ b/modules/editor/init.zsh @@ -211,6 +211,14 @@ zle -N expand-dot-to-parent-directory-path function expand-or-complete-with-indicator { local indicator zstyle -s ':prezto:module:editor:info:completing' format 'indicator' + + # This is included to work around a bug in zsh which shows up when interacting + # with multi-line prompts. + if [[ -z "$indicator" ]]; then + zle expand-or-complete + return + fi + print -Pn "$indicator" zle expand-or-complete zle redisplay