nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
6.02k stars 462 forks source link

fix: Location component was showing wrong column with inlay hints. #1243

Closed davidt closed 2 months ago

davidt commented 4 months ago

The location component had been previously changed to use vim.api.virtcol (the screen position of the cursor) instead of vim.api.col (the byte position of the cursor), in order to prevent showing the wrong column when multibyte characters are present. Unfortunately, the new inlay hints in neovim 0.10 make heavy use of virtual text, and therefore the column shown in the location component is often incorrect.

This change fixes it to use vim.api.charcol, which correctly handles variable-width characters without including virtual text.

shadmansaleh commented 2 months ago

Thanks for the fix