From 73c6be6eba1b2eeaa725a89ebdc2acd24e70ca4f Mon Sep 17 00:00:00 2001 From: Jimmy Yuen Ho Wong Date: Sat, 21 Dec 2024 14:26:20 +0000 Subject: [PATCH] Replace \r only when there's a detail --- lsp-completion.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lsp-completion.el b/lsp-completion.el index 71b174b801..ba904f37f6 100644 --- a/lsp-completion.el +++ b/lsp-completion.el @@ -245,7 +245,8 @@ The CLEANUP-FN will be called to cleanup." (concat (unless (and detail? (string-prefix-p " " detail?)) " ") - (s-replace "\r" "" detail?) + (when detail? + (s-replace "\r" "" detail?)) (unless (or omit-description (and description? (string-prefix-p " " description?))) " ")