fix(windows): fix folds getting messed up when changing todo state#930
Open
sahinf wants to merge 1 commit intonvim-orgmode:masterfrom
Open
fix(windows): fix folds getting messed up when changing todo state#930sahinf wants to merge 1 commit intonvim-orgmode:masterfrom
sahinf wants to merge 1 commit intonvim-orgmode:masterfrom
Conversation
Problem: when changing todo state in an orgfile using `orgmode-org_todo_prev` or `orgmode-org_todo_next`, the last line in the fold seems to exit the fold. This happens when using `nvim_buf_set_text` to change the TODO state. It also happens when using `nvim_buf_get_lines` to add the closing timestamp. I think it's a neovim issue. neovim/neovim#30352 might be related. Solution: `:help zX` Run fold recomputation. `zx` runs `zv` which opens the fold after recomputation. `zX` does not this do. Changing TODO state should not change fold state.
Member
|
Problem with recomputing folds is that it will recompute folds in whole file. If you have opened few folds above or below the TODO that you are changing, it will also close those after this TODO is switched. I believe most people would not want that to happen. |
ae38aa8 to
de701e8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem: when changing todo state in an orgfile using
orgmode-org_todo_prevororgmode-org_todo_next, the last line in the fold seems to exit the fold. This happens when usingnvim_buf_set_textto change the TODO state. It also happens when usingnvim_buf_get_linesto add the closing timestamp.I think it's a neovim issue.
neovim/neovim#30352 might be related.
Changes
Solution:
:help zXRun fold recomputation.
zxrunszvwhich opens the fold after recomputation.zXdoes not this do. Changing TODO state should not change fold state.Checklist
I confirm that I have:
Conventional Commits
specification (e.g.,
feat: add new feature,fix: correct bug,docs: update documentation).make test.