# HG changeset patch # User Bram Moolenaar # Date 1653147903 -7200 # Node ID ddbb36c1830b41ec486a2fbb6b2eff087da5dc46 # Parent 39709075cf96261be8216cca4a5a1e832de9a5fc patch 8.2.4991: no test for hwat patch 8.1.0535 fixes Commit: https://github.com/vim/vim/commit/93c1573dd284dc9cf5ed9265a0143aaf520d2920 Author: zeertzjq Date: Sat May 21 16:34:38 2022 +0100 patch 8.2.4991: no test for hwat patch 8.1.0535 fixes Problem: No test for hwat patch 8.1.0535 fixes. Solution: Add a test. (closes https://github.com/vim/vim/issues/10462) diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim --- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -231,6 +231,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! $\" + 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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4991, +/**/ 4990, /**/ 4989,