Vonr / align.nvim

A minimal plugin for NeoVim for aligning lines
GNU General Public License v3.0
147 stars 4 forks source link

Using Tab character as an indent aligns at the wrong char. #20

Open voronind-com opened 7 months ago

voronind-com commented 7 months ago

Screencast from 2023-12-05 15-50-48.webm

If you add tab as an indent, plugin aligns at the character after the one you specify.

voronind-com commented 7 months ago

I'm trying to create a pull request. I could narrow down the issue to the line 222 (in my case, but this should apply to other modes as well): I assume that the error comes from the fact that vim.fn.strdisplaywidth returns wrong value when tab is present, as tab is a stretched character.

edit: I'm unsure now.