align.nvim icon indicating copy to clipboard operation
align.nvim copied to clipboard

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

Open voronind-com opened this issue 1 year ago • 1 comments

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 avatar Dec 05 '23 12:12 voronind-com

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.

voronind-com avatar Dec 05 '23 13:12 voronind-com