Add cmp.visible

This commit is contained in:
hrsh7th
2021-10-10 12:13:57 +09:00
parent ae42ce7b05
commit babb8023c6
2 changed files with 7 additions and 1 deletions

View File

@@ -258,7 +258,7 @@ window.get_content_height = function(self)
}, function()
local height = 0
for _, text in ipairs(vim.api.nvim_buf_get_lines(self.buf, 0, -1, false)) do
height = height + math.ceil(math.max(1, vim.fn.strdisplaywidth(text)) / self.style.width)
height = height + math.ceil(math.max(1, vim.str_utfindex(text)) / self.style.width)
end
return height
end)