]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4991: no test for hwat patch 8.1.0535 fixes v8.2.4991
authorzeertzjq <zeertzjq@outlook.com>
Sat, 21 May 2022 15:34:38 +0000 (16:34 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 21 May 2022 15:34:38 +0000 (16:34 +0100)
Problem:    No test for hwat patch 8.1.0535 fixes.
Solution:   Add a test. (closes #10462)

src/testdir/test_fold.vim
src/version.c

index b0d07db15143ab6de62675b367d42284fdb7f4c0..67a399ddd8350a9a5f264a65eab0ed5683a8be33 100644 (file)
@@ -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! $\<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
index 6cb825c59a65563f2ab22ff4328567794ebdff97..bde9fe87a5857db398503854bd6c9f6c85d35de2 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4991,
 /**/
     4990,
 /**/