From 5e880b92f58d5a2502446690eb9e51cec4768d56 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 16 Nov 2022 20:32:42 +0530 Subject: [PATCH] Ensure active hyperlink is cleared when truncating output for completion descriptions --- tools/cli/zsh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cli/zsh.go b/tools/cli/zsh.go index b55de7e56..d1bac727a 100644 --- a/tools/cli/zsh.go +++ b/tools/cli/zsh.go @@ -67,7 +67,7 @@ func (self *Match) FormatForCompletionList(max_word_len int, f *markup.Context, word += strings.Repeat(" ", max_word_len-word_len) } if wcswidth.Stringwidth(desc) > max_desc_len { - desc = wcswidth.TruncateToVisualLength(desc, max_desc_len-2) + "\x1b[m…" + desc = wcswidth.TruncateToVisualLength(desc, max_desc_len-2) + "\x1b[m\x1b]8;;\x1b\\…" } if multiline { return word + "\n" + strings.Repeat(" ", max_word_len+2) + desc