Skip to content

Commit bcf4466

Browse files
zeertzjqchrisbra
authored andcommitted
patch 9.1.1824: tests: no test for displaying 'foldcolumn' with Unicode "foldinner"
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 <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent dd9ed46 commit bcf4466

File tree

3 files changed

+40
-4
lines changed

3 files changed

+40
-4
lines changed

runtime/doc/version9.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*version9.txt* For Vim version 9.1. Last change: 2025 Oct 03
1+
*version9.txt* For Vim version 9.1. Last change: 2025 Oct 04
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -322,8 +322,6 @@ Improvements in 'fillchars':
322322
"eob" in 'fillchars'.
323323
- Support for using multibyte items with the "stl", "stlnc", "foldopen",
324324
"foldclose" and "foldsep" items in the 'fillchars' option.
325-
- Support for configuring the character used inside a fold level region using
326-
"foldinner" in 'fillchars'.
327325

328326
Support for the XChaCha20 encryption method. 'cryptmethod'
329327

src/testdir/test_display.vim

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ func Test_fold_fillchars()
340340
\ ]
341341
call assert_equal(expected, lines)
342342

343-
" check setting foldinner
344343
set fdc=1 foldmethod=indent foldlevel=10
345344
call setline(1, ['one', ' two', ' two', ' three', ' three', 'four'])
346345
let lines = ScreenLines([1, 6], 22)
@@ -354,6 +353,7 @@ func Test_fold_fillchars()
354353
\ ]
355354
call assert_equal(expected, lines)
356355

356+
" check setting foldinner
357357
set fillchars+=foldinner:\
358358
let lines = ScreenLines([1, 6], 22)
359359
let expected = [
@@ -366,6 +366,42 @@ func Test_fold_fillchars()
366366
\ ]
367367
call assert_equal(expected, lines)
368368

369+
" check Unicode chars
370+
set fillchars=foldopen:▼,foldclose:▶,fold:⋯,foldsep:‖,foldinner:⋮
371+
let lines = ScreenLines([1, 6], 22)
372+
let expected = [
373+
\ ' one ',
374+
\ '▼ two ',
375+
\ '‖ two ',
376+
\ '▼ three',
377+
\ '⋮ three',
378+
\ ' four ',
379+
\ ]
380+
call assert_equal(expected, lines)
381+
382+
set fillchars-=foldinner:⋮
383+
let lines = ScreenLines([1, 6], 22)
384+
let expected = [
385+
\ ' one ',
386+
\ '▼ two ',
387+
\ '‖ two ',
388+
\ '▼ three',
389+
\ '2 three',
390+
\ ' four ',
391+
\ ]
392+
call assert_equal(expected, lines)
393+
394+
normal! 5ggzc
395+
let lines = ScreenLines([1, 5], 24)
396+
let expected = [
397+
\ ' one ',
398+
\ '▼ two ',
399+
\ '‖ two ',
400+
\ '▶+--- 2 lines: three⋯⋯⋯',
401+
\ ' four ',
402+
\ ]
403+
call assert_equal(expected, lines)
404+
369405
%bw!
370406
set fillchars& fdc& foldmethod& foldenable&
371407
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,8 @@ static char *(features[]) =
729729

730730
static int included_patches[] =
731731
{ /* Add new patch number below this line */
732+
/**/
733+
1824,
732734
/**/
733735
1823,
734736
/**/

0 commit comments

Comments
 (0)