vim-patch:8.0.0524

Problem:    Folds are messed up when 'encodin' is "utf-8".
Solution:   Also set the fold character when it's not multi-byte.

8da1e6cedf
This commit is contained in:
Justin M. Keyes
2017-07-29 02:40:25 +02:00
parent cddd4e613e
commit a0c7e35eee
3 changed files with 12 additions and 1 deletions

View File

@@ -1927,6 +1927,7 @@ static void fold_line(win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T
ScreenLines[off + col] = 0x80; // avoid storing zero ScreenLines[off + col] = 0x80; // avoid storing zero
} else { } else {
ScreenLinesUC[off + col] = 0; ScreenLinesUC[off + col] = 0;
ScreenLines[off + col] = fill_fold;
} }
col++; col++;
} else { } else {

View File

@@ -54,6 +54,16 @@ func! Test_display_foldtext_mbyte()
\ " 14 \u2502", \ " 14 \u2502",
\ ] \ ]
call assert_equal(expect, lines) call assert_equal(expect, lines)
set fillchars=fold:-,vert:\|
let lines=ScreenLines([1,3], winwidth(0)+1)
let expect=[
\ " 1 |",
\ "+ +-- 12 lines: 2". repeat("-", 23). "|",
\ " 14 |",
\ ]
call assert_equal(expect, lines)
set foldtext& fillchars& foldmethod& fdc& set foldtext& fillchars& foldmethod& fdc&
bw! bw!
endfunc endfunc

View File

@@ -428,7 +428,7 @@ static const int included_patches[] = {
// 527, // 527,
// 526, // 526,
// 525, // 525,
// 524, 524,
// 523, // 523,
// 522, // 522,
// 521, // 521,