From 3adeab2bed42597c8495fbe3a2376c746232f2e3 Mon Sep 17 00:00:00 2001 From: William Boman Date: Wed, 21 Apr 2021 02:48:29 +0200 Subject: 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 --- lua/telescope/utils.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua/telescope/utils.lua') diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index 4e8c1d3..85e8723 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -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)() -- cgit v1.2.3