fix: support multiple clients in lsp code actions (#722)

* fix: support multiple clients in lsp code actions

* no goto

* reduce diff a bit

* use displayer, also include lsp client name for each entry

* review comments
This commit is contained in:
William Boman
2021-04-21 02:48:29 +02:00
committed by GitHub
parent 13dae8c4d9
commit 3adeab2bed
3 changed files with 55 additions and 14 deletions

View File

@@ -259,13 +259,14 @@ utils.strdisplaywidth = (function()
return function(str, col)
local startcol = col or 0
str = tostring(str)
local s = ffi.new('char[?]', #str + 1)
ffi.copy(s, str)
return ffi.C.linetabsize_col(startcol, s) - startcol
end
else
return function(str, col)
return #str - (col or 0)
return #(tostring(str)) - (col or 0)
end
end
end)()