diff options
author | erw7 <erw7.github@gmail.com> | 2021-04-01 20:46:12 +0900 |
---|---|---|
committer | erw7 <erw7.github@gmail.com> | 2021-04-03 15:27:46 +0900 |
commit | 581b2bcde0b49bd5e3931beea4c6a677bf549ed5 (patch) | |
tree | ce184d5be781430f106b1aa25f318f2cc972ddda /test/functional/ui/cmdline_spec.lua | |
parent | a177820420d3de1614bff01321c0a54a2327fab3 (diff) | |
download | rneovim-581b2bcde0b49bd5e3931beea4c6a677bf549ed5.tar.gz rneovim-581b2bcde0b49bd5e3931beea4c6a677bf549ed5.tar.bz2 rneovim-581b2bcde0b49bd5e3931beea4c6a677bf549ed5.zip |
screen: fix problem with p_ch
When the screen is resized, p_ch is not re-set to the appropriate value.
As a result, access to invalid addresses was occurring.
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r-- | test/functional/ui/cmdline_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua index 21c01b3458..29a76c7a07 100644 --- a/test/functional/ui/cmdline_spec.lua +++ b/test/functional/ui/cmdline_spec.lua @@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen') local clear, feed = helpers.clear, helpers.feed local source = helpers.source local command = helpers.command +local assert_alive = helpers.assert_alive local function new_screen(opt) local screen = Screen.new(25, 5) @@ -842,3 +843,14 @@ describe('cmdline redraw', function() ]], unchanged=true} end) end) + +describe("cmdline height", function() + it("does not crash resized screen #14263", function() + clear() + local screen = Screen.new(25, 10) + screen:attach() + command('set cmdheight=9999') + screen:try_resize(25, 5) + assert_alive() + end) +end) |