* fix(#2746): fix cursorcolumn and right aligned icons in floating windows * feat: remove right aligned icons from full name float, show float over right aligned icons * refactoring: move `extmarks_length` to utils.lua * fix: decrease `win_width` instead of increasing `text_width` when computing condition for full name float to show --------- Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
@@ -329,14 +329,7 @@ local function grow()
|
||||
local count = vim.fn.strchars(l)
|
||||
-- also add space for right-aligned icons
|
||||
local extmarks = vim.api.nvim_buf_get_extmarks(M.get_bufnr(), ns_id, { line_nr, 0 }, { line_nr, -1 }, { details = true })
|
||||
for _, extmark in ipairs(extmarks) do
|
||||
local virt_texts = extmark[4].virt_text
|
||||
if virt_texts then
|
||||
for _, virt_text in ipairs(virt_texts) do
|
||||
count = count + vim.fn.strchars(virt_text[1])
|
||||
end
|
||||
end
|
||||
end
|
||||
count = count + utils.extmarks_length(extmarks)
|
||||
if resizing_width < count then
|
||||
resizing_width = count
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user