diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-05-22 07:27:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-22 07:27:26 +0800 |
| commit | f0717ffade6a36c1e5aa85214f6667e384abc169 (patch) | |
| tree | 64be896cd8b9db3e25bbe29fa7f416d6acc3ef43 /src/nvim/testdir | |
| parent | cbf0360179fa5a5045005bc2be0b270f97f3bb23 (diff) | |
| parent | c3568b31f423b8af11be155f6fdb7b464a519fd2 (diff) | |
| download | rneovim-f0717ffade6a36c1e5aa85214f6667e384abc169.tar.gz rneovim-f0717ffade6a36c1e5aa85214f6667e384abc169.tar.bz2 rneovim-f0717ffade6a36c1e5aa85214f6667e384abc169.zip | |
Merge pull request #18682 from zeertzjq/vim-8.1.0535
vim-patch:8.1.0535,8.2.4991: increment/decrement might get interrupted by updating folds
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_fold.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 9f5ad53adb..b1d91fd879 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -217,6 +217,26 @@ func Test_update_folds_expr_read() set foldmethod& foldexpr& endfunc +" Test for what patch 8.1.0535 fixes. +func Test_foldexpr_no_interrupt_addsub() + new + func! FoldFunc() + call setpos('.', getcurpos()) + return '=' + endfunc + + set foldmethod=expr + set foldexpr=FoldFunc() + call setline(1, '1.2') + + exe "norm! $\<C-A>" + call assert_equal('1.3', getline(1)) + + bwipe! + delfunc FoldFunc + set foldmethod& foldexpr& +endfunc + func Check_foldlevels(expected) call assert_equal(a:expected, map(range(1, line('$')), 'foldlevel(v:val)')) endfunc |