From a2bb360eec6acccd9f3fdfe3e94182e8518ee3c9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 19 Sep 2022 20:32:10 +0530 Subject: [PATCH] Dont output escape strings in descriptions --- tools/completion/zsh.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/completion/zsh.go b/tools/completion/zsh.go index 48321fbc1..2e1933c46 100644 --- a/tools/completion/zsh.go +++ b/tools/completion/zsh.go @@ -68,7 +68,6 @@ func fmt_desc(word, desc string, max_word_len int, f *markup.Context, screen_wid if wcswidth.Stringwidth(desc) > max_desc_len { desc = wcswidth.TruncateToVisualLength(desc, max_desc_len-2) + "…" } - if multiline { return word + "\n " + desc } @@ -131,12 +130,9 @@ func zsh_output_serializer(completions []*Completions, shell_state map[string]st ctty.Close() if err == nil { screen_width = int(sz.Col) - f = markup.New(true) } } - if f == nil { - f = markup.New(false) - } + f = markup.New(false) // ZSH freaks out if there are escape codes in the description strings return serialize(completions[0], f, screen_width) }