I raised a discussion but seems it's not as active as issues. So I move here.
I very like vim9 newly introduced "virtual text" feature . It makes inlay hints possible in programming.
But something bothering me is that when I set ruler in status line (airline plugin, actually), I always get column number of cursor position which is sum of "real text" and "virtual text" .
When I move cursor from left side of virtual text to right side, column number jumps -- that's ok.
When I have a max width of code line, I can't judge whether my code really exceeding width limit -- that's terrible.
Is there a way to get column number excluding virtual texts width, and get "real text" part of column ?
Describe the solution you'd like
If there isn't easy way to achieve the requirement, should it add a new status line format option that calculating column number ignoring virtual text?
It seems there's already two kinds of "column" in status line option: "c" for bytes index and "v" for display column. I think a new "real text column number" should be good.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Should it also ignore 'showbreak' and 'breakindent' though?
Also it's may be unclear what this number should be when there are both virtual text and TABs in a line, because TABs are align to multiples of 'tabstop' columns, and virtual text affects the size of TABs.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Sorry about I didn't considered that. It seems virtual text feature is more complex than I thought.
If there is a "real text column", I think 'showbreak' char's column can simply be last char in screen's real text column + 1.
Something like this: "t" column number is 11, and with a 15 width virtual text in line, the line break char ">" can be 18 rather than 32.
| some text `virtual text` line>| | ^ ^| cn=11 cn=18
I have no idea about how to calculate a column number with both virtual text and TAB in a line. Does it works if we just assume virtual text feature is disabled when calculating a column number, but print a line with virtual text?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()