diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-29 02:40:25 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-08-12 17:39:07 +0200 |
commit | a0c7e35eeed489840f1d063b3b8265d01024e340 (patch) | |
tree | a4770dc928e5061e8d713e22b2948c8e229349f9 | |
parent | cddd4e613e2fefaa1c3fe8c20617f5ee02845617 (diff) | |
download | rneovim-a0c7e35eeed489840f1d063b3b8265d01024e340.tar.gz rneovim-a0c7e35eeed489840f1d063b3b8265d01024e340.tar.bz2 rneovim-a0c7e35eeed489840f1d063b3b8265d01024e340.zip |
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.
https://github.com/vim/vim/commit/8da1e6cedf839902e15987a98733ebd31b5f1b81
-rw-r--r-- | src/nvim/screen.c | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_display.vim | 10 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index c302ac695e..dd958eec80 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -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 } else { ScreenLinesUC[off + col] = 0; + ScreenLines[off + col] = fill_fold; } col++; } else { diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index 4253b56933..48b7a2318e 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -54,6 +54,16 @@ func! Test_display_foldtext_mbyte() \ " 14 \u2502", \ ] 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& bw! endfunc diff --git a/src/nvim/version.c b/src/nvim/version.c index b6386049bf..a1655f1caa 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -428,7 +428,7 @@ static const int included_patches[] = { // 527, // 526, // 525, - // 524, + 524, // 523, // 522, // 521, |