mirror of
https://github.com/neovim/neovim.git
synced 2025-12-03 15:33:03 +00:00
vim-patch:8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.0f6e28f686Ensure cmdline window doesn't stop us from closing tabs with EXITFREE. mem_free_all -> win_free_all -> tabpage_close -> ... -> goto_tabpage_tp -> CHECK_CMDWIN can cause an infinite loop if Nvim is exited without using standard methods such as :qa! and friends (e.g: killed via a signal). This issue had caused the ASAN CI's functionaltests to timeout. Cherry-pick Test_cmdwin_tabpage from v8.2.4463.38b85cb4d7This bug was already fixed in Nvim. Note that g<Tab> inside cmdwin is already tested for in tabnewentered_spec.lua anyway. E492 is thrown after E11 when using ":norm" in assert_fails for some reason (except after v8.2.1919, which isn't ported yet). As v8.2.1183 isn't ported yet, so we cannot assert E11 directly. Modify the test to check for E11 and E492 seperately; when v8.2.1183 is ported, the assertion for E492 will fail and the changes can be reverted to match upstream. Remove redundant CHECK_CMDWIN from goto_tabpage; it's handled with text_locked() and text_locked_msg() above: vim-patch:8.2.4434: duplicate check for cmdline window Problem: Duplicate check for cmdline window. Solution: Remove the second check. (Sean Dewar, closes vim/vim#9816)16b51d26fe
This commit is contained in:
@@ -3257,9 +3257,7 @@ char_u *get_user_var_name(expand_T *xp, int idx)
|
||||
}
|
||||
|
||||
// b: variables
|
||||
// In cmdwin, the alternative buffer should be used.
|
||||
hashtab_T *ht
|
||||
= is_in_cmdwin() ? &prevwin->w_buffer->b_vars->dv_hashtab : &curbuf->b_vars->dv_hashtab;
|
||||
const hashtab_T *ht = &prevwin_curwin()->w_buffer->b_vars->dv_hashtab;
|
||||
if (bdone < ht->ht_used) {
|
||||
if (bdone++ == 0) {
|
||||
hi = ht->ht_array;
|
||||
@@ -3273,8 +3271,7 @@ char_u *get_user_var_name(expand_T *xp, int idx)
|
||||
}
|
||||
|
||||
// w: variables
|
||||
// In cmdwin, the alternative window should be used.
|
||||
ht = is_in_cmdwin() ? &prevwin->w_vars->dv_hashtab : &curwin->w_vars->dv_hashtab;
|
||||
ht = &prevwin_curwin()->w_vars->dv_hashtab;
|
||||
if (wdone < ht->ht_used) {
|
||||
if (wdone++ == 0) {
|
||||
hi = ht->ht_array;
|
||||
|
||||
Reference in New Issue
Block a user