fix(fold): use Folded highlight even with spell on

Partially addresses https://github.com/neovim/neovim/issues/12982. It's
more a quickfix while reworking folds.
This commit is contained in:
Matthieu Coudron
2020-11-23 20:58:13 +01:00
parent 4f1fc0f6d5
commit 7eb0c16dc8
2 changed files with 28 additions and 0 deletions

View File

@@ -2196,6 +2196,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow,
}
if (wp->w_p_spell
&& foldinfo.fi_lines == 0
&& *wp->w_s->b_p_spl != NUL
&& !GA_EMPTY(&wp->w_s->b_langp)
&& *(char **)(wp->w_s->b_langp.ga_data) != NULL) {

View File

@@ -117,6 +117,33 @@ describe("folded lines", function()
end
end)
it("work with spell", function()
command("set spell")
insert([[
This is a
valid English
sentence composed by
an exhausted developer
in his cave.
]])
feed("gg")
feed("zf3j")
if not multigrid then
-- screen:snapshot_util()
screen:expect{grid=[[
{5:^+-- 4 lines: This is a······················}|
in his cave. |
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
|
]]}
end
end)
it("works with multibyte fillchars", function()
insert([[
aa