This also will ensure any features like it in the future from other plugins do not interfere with the headlines later on.
In theory, extmark priorities would work here, but in pratice they do not. If this extmark is set last by a higher priority using only the virtual text, it can be arbitrarily shifted by other extmark content and the same occurs when the extmark set is of a lower priority. By specifying the window column to apply to, we bypass all the priorities shenanigans and directly set the correct position of the headline.
TL;DR:
Adds compat with virtual indents in Nvim Orgmode.
Before this change:
Notice the weird indents on lines 2, 3, 5, 6, and 8. Those result from a conflicting extmark set by Nvim Orgmode trying to set virtual indentation.
After this change:
Now headlines.nvim directly sets the window column to apply to instead of battling with other extmarks on virtext. (As a note, extmark priorities are not a solution in this case afaik, see the commit message body paragraph 3 for more details.)
Copied from the body of the commit message:
TL;DR:
Adds compat with virtual indents in Nvim Orgmode.
Before this change: Notice the weird indents on lines 2, 3, 5, 6, and 8. Those result from a conflicting extmark set by Nvim Orgmode trying to set virtual indentation.
After this change:
Now
headlines.nvim
directly sets the window column to apply to instead of battling with other extmarks on virtext. (As a note, extmark priorities are not a solution in this case afaik, see the commit message body paragraph 3 for more details.)