From 6a0507c51e073846380030d4e665932a0a2ecc45 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Mon, 5 Jun 2023 14:32:27 -0500 Subject: [PATCH] Display multi-line signatureHelp correctly Newlines in signatureHelp label were being displayed incorrectly as NUL characters (^@) in the preview window. --- autoload/lsc/signaturehelp.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/lsc/signaturehelp.vim b/autoload/lsc/signaturehelp.vim index 19229695..dc80175b 100644 --- a/autoload/lsc/signaturehelp.vim +++ b/autoload/lsc/signaturehelp.vim @@ -45,9 +45,10 @@ function! s:ShowHelp(signatureHelp) abort if !has_key(l:signature, 'label') return endif + let l:lines = split(l:signature.label, "\n") if !has_key(l:signature, 'parameters') - call lsc#util#displayAsPreview([l:signature.label], &filetype, + call lsc#util#displayAsPreview(l:lines, &filetype, \ function('HighlightCurrentParameter')) return endif @@ -60,7 +61,7 @@ function! s:ShowHelp(signatureHelp) abort endif endif - call lsc#util#displayAsPreview([l:signature.label], &filetype, + call lsc#util#displayAsPreview(l:lines, &filetype, \ function('HighlightCurrentParameter')) endfunction