Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

PriceHiller
Copy link
Contributor

@PriceHiller PriceHiller commented Apr 10, 2024

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.

@PriceHiller PriceHiller marked this pull request as draft April 10, 2024 05:54
This ensures when the treesitter parser has errors, the manual indent
sizing doesn't return virtual indentation for headlines.
@PriceHiller PriceHiller force-pushed the fix/virtual-indent-offset branch from 7e04de0 to 0b21748 Compare April 10, 2024 05:59
@PriceHiller PriceHiller marked this pull request as ready for review April 10, 2024 06:00
@PriceHiller PriceHiller changed the title fix(virtual indent): offset on_lines start & end by +1 fix(virtual indent): do not return virtual indentation for headlines Apr 10, 2024
Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed things jumping around from time to time but I wasn't able to reproduce it consistently.

This is probably the culprit. Thanks!

@kristijanhusak kristijanhusak merged commit 974663f into nvim-orgmode:master Apr 10, 2024
6 checks passed
@PriceHiller PriceHiller deleted the fix/virtual-indent-offset branch April 10, 2024 09:21
SlayerOfTheBad pushed a commit to SlayerOfTheBad/orgmode that referenced this pull request Aug 16, 2024
…vim-orgmode#716)

This ensures when the treesitter parser has errors, the manual indent
sizing doesn't return virtual indentation for headlines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants