neovim/test/functional/lua
Sean Dewar c3d22d32ee
vim-patch:8.2.3862: crash on exit with EXITFREE and using win_execute()
Problem:    Crash on exit with EXITFREE and using win_execute().
Solution:   Also save and restore tp_topframe. (issue vim/vim#9374)

dab17a0689

Couldn't repro the crash in the test, but I only care about this patch so
switch_win sets topframe properly for win_split_ins in nvim_open_win and
nvim_win_set_config.
Add a test using nvim_win_call and :wincmd, as I couldn't repro the issue via
nvim_open_win or nvim_win_set_config (though it's clear they're affected by this
patch).

That said, at that point, could just use {un}use_tabpage inside switch_win
instead, which also updates tp_curwin (though maybe continue to not set it in
restore_win). That would also fix possible inconsistent behaviour such as:

:call win_execute(w, "let curwin_nr1 = tabpagewinnr(1)")
:let curwin_nr2 = tabpagewinnr(1)

Where it's possible for curwin_nr1 != curwin_nr2 if these commands are run from
the 1st tabpage, but window "w" is in the 2nd (as the 1st tabpage's tp_curwin
may still be invalid). I'll probably PR a fix for that later in Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-03-09 21:58:30 +00:00
..
api_spec.lua test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
base64_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00
buffer_updates_spec.lua Merge pull request #26734 from bfredl/splitaroo 2024-01-13 10:59:46 +01:00
command_line_completion_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00
commands_spec.lua feat(ex_cmds): no error on :lua with {range} and {code} (#27290) 2024-02-02 13:14:10 +08:00
diagnostic_spec.lua test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
ffi_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00
filetype_spec.lua test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
fs_spec.lua test: refactor Paths 2024-01-17 10:10:17 +00:00
glob_spec.lua refactor(lua): refactored glob 2024-01-19 11:54:04 +00:00
highlight_spec.lua fix(lua): make highlight.on_yank use win-local highlight (#27349) 2024-02-22 16:39:32 +08:00
inspector_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00
iter_spec.lua feat(vim.iter): add Iter:flatten (#26786) 2024-01-10 20:57:51 -06:00
json_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00
loader_spec.lua fix(loader): remove cyclic dependency on vim.fs (when --luamod-dev) 2024-02-13 10:29:22 +00:00
loop_spec.lua test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
luaeval_spec.lua fix(eval): skip over v:lua properly (#27517) 2024-02-18 19:11:44 +08:00
mpack_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00
overrides_spec.lua test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
runtime_spec.lua test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
secure_spec.lua test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
snippet_spec.lua fix(lsp): add snippet regression test (#27618) 2024-02-25 11:05:37 +01:00
spell_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00
system_spec.lua fix(vim.system): don't process non-fast events during wait() (#27300) 2024-02-02 21:52:01 +08:00
text_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00
thread_spec.lua test: do not inject vim module into global helpers 2024-01-12 12:04:18 +00:00
ui_event_spec.lua test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
ui_spec.lua fix(vim.ui.open): use explorer.exe instead of wslview #26947 2024-02-20 09:14:50 -08:00
uri_spec.lua fix(lua): remove uri fragment from file paths (#27647) 2024-02-28 10:50:53 +01:00
version_spec.lua feat(vim.version): add vim.version.le and vim.version.ge 2024-01-21 11:41:50 +01:00
vim_spec.lua vim-patch:8.2.3862: crash on exit with EXITFREE and using win_execute() 2024-03-09 21:58:30 +00:00
watch_spec.lua feat(lsp): add fswatch watchfunc backend 2024-03-01 23:00:20 +00:00
xdiff_spec.lua refactor(lua): use a keyset for vim.diff opts parsing 2024-02-13 11:54:44 +01:00