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

Promoting/Demoting opens fold. #50

Closed
Maltimore opened this issue Jul 16, 2021 · 2 comments
Closed

Promoting/Demoting opens fold. #50

Maltimore opened this issue Jul 16, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@Maltimore
Copy link
Contributor

Describe the bug
Promoting/Demoting opens fold.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a closed fold headline
  2. Promote/demote subtree with ">s" in normal mode
  3. headline will get demoted but the fold will be opened.

Expected behavior
Fold stays closed

  • OS: Linux Ubuntu
  • Neovim version/commit: most recent as of 2021-07-16
@Maltimore Maltimore added the bug Something isn't working label Jul 16, 2021
@kristijanhusak
Copy link
Member

Folds are a bit tricky in neovim because they automatically open once you modify the content. I pushed a fix as an attempt to fix it. Can you pull latest master and give it a try?

@Maltimore
Copy link
Contributor Author

Looks good! Thanks a lot.

It actually sounds like one should have a discussion on the neovim issue tracker whether it is desired that folds open automatically when something changes?!

There is still a small problem with promoting: if you promote a subtree where the next (sub-)level is currently expanded but the level after that is still collapsed, it will expand everything. However if the subtree is completely collapsed, it works as intended. I don't consider this particularly problematic though (and anyways it should probably be fixed on neovims side), so I'll close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants