aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
diff options
context:
space:
mode:
authorJaehwang Jung <tomtomjhj@gmail.com>2023-12-04 11:37:45 +0900
committerLewis Russell <me@lewisr.dev>2023-12-06 11:00:05 +0000
commit040369e1e4b86c4655a6885b36ee89ad4f10ca16 (patch)
treea428438a88e35ac59e42f2c044a922460a4a4e0c /src/nvim/ui.c
parentf22e9e10f9ad77d2cce7f52837c5724877505a08 (diff)
downloadrneovim-040369e1e4b86c4655a6885b36ee89ad4f10ca16.tar.gz
rneovim-040369e1e4b86c4655a6885b36ee89ad4f10ca16.tar.bz2
rneovim-040369e1e4b86c4655a6885b36ee89ad4f10ca16.zip
fix(treesitter): don't forcefully open folds
Problem: When `vim._foldupdate()` is invoked inside a scheduled callback, the cursor may have moved to a line with a closed fold, e.g., after `dd` on the line that is one line above a folded region. Then it opens the fold, which is unnecessary and distracting. Legacy foldexprs do not have this issue. Solution: Don't explicitly open folds on cursor. Note: This doesn't completely prevent spurious opening of folds. That is due to bugs in treesitter foldexpr algorithm, which should be addressed separately.
Diffstat (limited to 'src/nvim/ui.c')
0 files changed, 0 insertions, 0 deletions