diff options
author | G-flat <63449095+G-flat@users.noreply.github.com> | 2020-10-05 15:15:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-05 15:15:10 +0800 |
commit | b0769729c805ef33d47f383fd8b2ab18da5fa33c (patch) | |
tree | ee66236c5172c1b65b8a6415f756a78d6db29ac5 /test/functional/ui/fold_spec.lua | |
parent | 1d08dfab5b057b51aed98450afd3ad1c888870ff (diff) | |
parent | f7aeac7263c792e1503f9169abed20b6f5b9da99 (diff) | |
download | rneovim-b0769729c805ef33d47f383fd8b2ab18da5fa33c.tar.gz rneovim-b0769729c805ef33d47f383fd8b2ab18da5fa33c.tar.bz2 rneovim-b0769729c805ef33d47f383fd8b2ab18da5fa33c.zip |
Merge pull request #1 from neovim/master
rebase
Diffstat (limited to 'test/functional/ui/fold_spec.lua')
-rw-r--r-- | test/functional/ui/fold_spec.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index fe67b9f6b0..9877f30206 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -6,6 +6,8 @@ local feed_command = helpers.feed_command local insert = helpers.insert local funcs = helpers.funcs local meths = helpers.meths +local source = helpers.source +local assert_alive = helpers.assert_alive describe("folded lines", function() local screen @@ -357,4 +359,26 @@ describe("folded lines", function() | ]]} end) + + it('does not crash when foldtext is longer than columns #12988', function() + source([[ + function! MyFoldText() abort + return repeat('-', &columns + 100) + endfunction + ]]) + command('set foldtext=MyFoldText()') + feed("i<cr><esc>") + feed("vkzf") + screen:expect{grid=[[ + {5:^---------------------------------------------}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]} + assert_alive() + end) end) |