aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/screen.c1
-rw-r--r--test/functional/ui/fold_spec.lua27
2 files changed, 28 insertions, 0 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 20fec490a9..425458f210 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -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) {
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua
index 669ec5d3ed..018049d2f4 100644
--- a/test/functional/ui/fold_spec.lua
+++ b/test/functional/ui/fold_spec.lua
@@ -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