aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/crash_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-08-02 07:33:52 +0800
committerGitHub <noreply@github.com>2024-08-02 07:33:52 +0800
commitac15db4b9c21b51dc1789c4c75bd8cb363c6715d (patch)
tree39230226ac82217aaba7b4c2b3d72a99ac63143b /test/functional/legacy/crash_spec.lua
parentd65788052fa0e634e521e67b44f67bf09b417319 (diff)
parent6af359ef4cc3c221e0e3102ab2b54cf64d7c9835 (diff)
downloadrneovim-ac15db4b9c21b51dc1789c4c75bd8cb363c6715d.tar.gz
rneovim-ac15db4b9c21b51dc1789c4c75bd8cb363c6715d.tar.bz2
rneovim-ac15db4b9c21b51dc1789c4c75bd8cb363c6715d.zip
Merge pull request #29945 from zeertzjq/vim-9.1.0647
vim-patch:9.0.{2149,2158},9.1.0647
Diffstat (limited to 'test/functional/legacy/crash_spec.lua')
-rw-r--r--test/functional/legacy/crash_spec.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/legacy/crash_spec.lua b/test/functional/legacy/crash_spec.lua
index 04f77c7d4f..e72c3a512a 100644
--- a/test/functional/legacy/crash_spec.lua
+++ b/test/functional/legacy/crash_spec.lua
@@ -1,8 +1,12 @@
+local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local assert_alive = n.assert_alive
local clear = n.clear
local command = n.command
+local eq = t.eq
+local eval = n.eval
+local exec = n.exec
local feed = n.feed
before_each(clear)
@@ -32,3 +36,18 @@ it('no crash with very long option error message', function()
pcall(command, 'source test/old/testdir/crash/poc_did_set_langmap')
assert_alive()
end)
+
+it('no crash when closing window with tag in loclist', function()
+ exec([[
+ new
+ lexpr ['foo']
+ lopen
+ let g:qf_bufnr = bufnr()
+ lclose
+ call settagstack(1, #{items: [#{tagname: 'foo', from: [g:qf_bufnr, 1, 1, 0]}]})
+ ]])
+ eq(1, eval('bufexists(g:qf_bufnr)'))
+ command('1close')
+ eq(0, eval('bufexists(g:qf_bufnr)'))
+ assert_alive()
+end)