nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.
https://nvim-orgmode.github.io/
MIT License
2.8k stars 121 forks source link

fix(virtual indent): do not return virtual indentation for headlines #716

Closed PriceHiller closed 1 month ago

PriceHiller commented 1 month ago

Copied from the body of the commit message:

This ensures when the treesitter parser has errors, the manual indent sizing doesn't return virtual indentation for headlines.

Before the Fix

messed-up-vindent-headlines

After the Fix

fixed-vindent-headlines

Misc

What's annoying is that the tests didn't catch this -- need a test to check raw insertion and typing I guess. That would've caught this for sure. The current tests loads the file, where the virtual indent works as expected.

Something to put on my TODO when I have more time.

Again, if anything crops up with Virtual Indent, ping me. I'll gladly look at it.