diff options
author | Tony Chen <36219739+chentau@users.noreply.github.com> | 2021-03-29 05:19:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 08:19:59 -0400 |
commit | aa6adacd77e59b2cf2ca7bdeae9a24c062b2a9c0 (patch) | |
tree | 54cb82a3a1dd21a54d18b89978ac74a2f97653ae /test | |
parent | 8665a96b92553b26c8c9c215900964b8a898595f (diff) | |
download | rneovim-aa6adacd77e59b2cf2ca7bdeae9a24c062b2a9c0.tar.gz rneovim-aa6adacd77e59b2cf2ca7bdeae9a24c062b2a9c0.tar.bz2 rneovim-aa6adacd77e59b2cf2ca7bdeae9a24c062b2a9c0.zip |
Make sure window is still valid in the middle of calling :lopen (#14240)
Make sure that oldwin is not invalid after splitting
Revisit this when porting vim patch v8.1.0892 and related quickfix patches.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/viml/errorlist_spec.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/viml/errorlist_spec.lua b/test/functional/viml/errorlist_spec.lua index 9acc61e398..077d816903 100644 --- a/test/functional/viml/errorlist_spec.lua +++ b/test/functional/viml/errorlist_spec.lua @@ -68,4 +68,17 @@ describe('setloclist()', function() command('lclose | wincmd w | lopen') eq('foo', get_cur_win_var('quickfix_title')) end) + + it("doesn't crash when when window is closed in the middle #13721", function() + helpers.insert([[ + hello world]]) + + command("vsplit") + command("autocmd WinLeave * :call nvim_win_close(0, v:true)") + + command("call setloclist(0, [])") + command("lopen") + + helpers.assert_alive() + end) end) |