]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1824: tests: no test for displaying 'foldcolumn' with Unicode "foldinner" v9.1.1824
authorzeertzjq <zeertzjq@outlook.com>
Sat, 4 Oct 2025 10:35:49 +0000 (10:35 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 4 Oct 2025 10:35:49 +0000 (10:35 +0000)
Problem:  tests: no test for displaying 'foldcolumn' with Unicode
          "foldinner" in 'fillchars'.
Solution: Add a few more test cases.  Also fix misplaced "foldinner"
          entry in version9.txt (zeertzjq).

closes: #18483

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/version9.txt
src/testdir/test_display.vim
src/version.c

index 6ae6d0118f5d018cbeced8cede4518a8ac22e632..2a4a2d07968658f47b88820a9a7db8988a98bd09 100644 (file)
@@ -1,4 +1,4 @@
-*version9.txt*  For Vim version 9.1.  Last change: 2025 Oct 03
+*version9.txt*  For Vim version 9.1.  Last change: 2025 Oct 04
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -322,8 +322,6 @@ Improvements in 'fillchars':
   "eob" in 'fillchars'.
 - Support for using multibyte items with the "stl", "stlnc", "foldopen",
   "foldclose" and "foldsep" items in the 'fillchars' option.
-- Support for configuring the character used inside a fold level region using
-  "foldinner" in 'fillchars'.
 
 Support for the XChaCha20 encryption method. 'cryptmethod'
 
index 6bcc8a241eea4675483364e0473ae05cd52a0eb5..698b6a6b614583e595fe63550596aef894384149 100644 (file)
@@ -340,7 +340,6 @@ func Test_fold_fillchars()
         \ ]
   call assert_equal(expected, lines)
 
-  " check setting foldinner
   set fdc=1 foldmethod=indent foldlevel=10
   call setline(1, ['one', '    two', ' two', '         three', '               three', 'four'])
   let lines = ScreenLines([1, 6], 22)
@@ -354,6 +353,7 @@ func Test_fold_fillchars()
         \ ]
   call assert_equal(expected, lines)
 
+  " check setting foldinner
   set fillchars+=foldinner:\ 
   let lines = ScreenLines([1, 6], 22)
   let expected = [
@@ -366,6 +366,42 @@ func Test_fold_fillchars()
         \ ]
   call assert_equal(expected, lines)
 
+  " check Unicode chars
+  set fillchars=foldopen:▼,foldclose:▶,fold:⋯,foldsep:‖,foldinner:⋮
+  let lines = ScreenLines([1, 6], 22)
+  let expected = [
+        \ ' one                  ',
+        \ '▼        two          ',
+        \ '‖        two          ',
+        \ '▼                three',
+        \ '⋮                three',
+        \ ' four                 ',
+        \ ]
+  call assert_equal(expected, lines)
+
+  set fillchars-=foldinner:⋮
+  let lines = ScreenLines([1, 6], 22)
+  let expected = [
+        \ ' one                  ',
+        \ '▼        two          ',
+        \ '‖        two          ',
+        \ '▼                three',
+        \ '2                three',
+        \ ' four                 ',
+        \ ]
+  call assert_equal(expected, lines)
+
+  normal! 5ggzc
+  let lines = ScreenLines([1, 5], 24)
+  let expected = [
+        \ ' one                    ',
+        \ '▼        two            ',
+        \ '‖        two            ',
+        \ '▶+---  2 lines: three⋯⋯⋯',
+        \ ' four                   ',
+        \ ]
+  call assert_equal(expected, lines)
+
   %bw!
   set fillchars& fdc& foldmethod& foldenable&
 endfunc
index 30a9d76dddae5558465a7997bc53f4c62974c3b5..48241d3ddc1d9513c78be14926188d87eab3b759 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1824,
 /**/
     1823,
 /**/