mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 19:48:32 +00:00
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:
@@ -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 {
|
||||||
|
@@ -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
|
||||||
|
@@ -428,7 +428,7 @@ static const int included_patches[] = {
|
|||||||
// 527,
|
// 527,
|
||||||
// 526,
|
// 526,
|
||||||
// 525,
|
// 525,
|
||||||
// 524,
|
524,
|
||||||
// 523,
|
// 523,
|
||||||
// 522,
|
// 522,
|
||||||
// 521,
|
// 521,
|
||||||
|
Reference in New Issue
Block a user