Skip to content

Commit

Permalink
issue: #213 new lines in floating window
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-x committed Oct 12, 2023
1 parent e371ff6 commit 33250c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/lsp_signature/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ local signature_handler = function(err, result, ctx, config)
end
log('before insert', lines)
for index, sig in ipairs(result.signatures) do
sig.label = sig.label:gsub('%s+$', ''):gsub('\r', ' '):gsub('\n', ' ')
if index ~= activeSignature then
table.insert(lines, offset, sig.label)
offset = offset + 1
Expand All @@ -414,6 +415,7 @@ local signature_handler = function(err, result, ctx, config)
if #result.signatures > 1 then
label = result.signatures[activeSignature].label
end
label = label:gsub('%s+$', ''):gsub('\r', ' '):gsub('\n', ' ')

log(
'label:',
Expand Down Expand Up @@ -1001,7 +1003,7 @@ local signature_should_close_handler = helper.mk_handler(function(err, result, c
local last_valid_result = result and result.signatures and result.signatures[1]
local llabel = nil
if last_valid_result then
llabel = result.signatures[1].label
llabel = result.signatures[1].label:gsub('%s+$', ''):gsub('\r', ' '):gsub('\n', ' ')
end

log(rlabel, llabel)
Expand Down

0 comments on commit 33250c8

Please sign in to comment.