diff options
author | glepnir <glephunter@gmail.com> | 2024-03-07 18:12:57 +0800 |
---|---|---|
committer | glepnir <glephunter@gmail.com> | 2024-03-09 18:20:59 +0800 |
commit | b21d960119344b19f8cec64f8e9d56bfa9cdce85 (patch) | |
tree | 205449ce50eb8ce41a3207dd0505c7f2c594d3fa /test/functional/core/main_spec.lua | |
parent | 649dd00fe2e54183cc210f24d36504a61e5ea605 (diff) | |
download | rneovim-b21d960119344b19f8cec64f8e9d56bfa9cdce85.tar.gz rneovim-b21d960119344b19f8cec64f8e9d56bfa9cdce85.tar.bz2 rneovim-b21d960119344b19f8cec64f8e9d56bfa9cdce85.zip |
fix(startup): set full_screen when in ex_mode
Problem Description: In ex_mode, the default_grid.chars are not allocated, and subsequently,
the w_grid.target in curwin is not allocated to default_grid in update_screen. This leads to
a null pointer crash when the completion function is executed in ex_mode.
Solution: Set full_screen when in ex_mode to ensure that default_grid is allocated.
Diffstat (limited to 'test/functional/core/main_spec.lua')
-rw-r--r-- | test/functional/core/main_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/core/main_spec.lua b/test/functional/core/main_spec.lua index 1d2261ee05..9d8d64c82d 100644 --- a/test/functional/core/main_spec.lua +++ b/test/functional/core/main_spec.lua @@ -73,6 +73,18 @@ describe('command-line option', function() eq(#'100500\n', attrs.size) end) + it('does not crash when run completion in ex mode', function() + fn.system({ + nvim_prog_abs(), + '--clean', + '-e', + '-s', + '--cmd', + 'exe "norm! i\\<C-X>\\<C-V>"', + }) + eq(0, eval('v:shell_error')) + end) + it('does not crash after reading from stdin in non-headless mode', function() skip(is_os('win')) local screen = Screen.new(40, 8) |