mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
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:
@@ -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) {
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user