mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 23:08:16 +00:00
vim-patch:8.0.1160: getting tab-local variable fails after closing window
Problem: Getting tab-local variable fails after closing window.
Solution: set tp_firstwin and tp_lastwin. (Jason Franklin, closes vim/vim#2170)
816968defc
This commit is contained in:
@@ -10222,7 +10222,8 @@ static void f_gettabvar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
if (tp != NULL && varname != NULL) {
|
||||
// Set tp to be our tabpage, temporarily. Also set the window to the
|
||||
// first window in the tabpage, otherwise the window is not valid.
|
||||
win_T *window = tp->tp_firstwin == NULL ? firstwin : tp->tp_firstwin;
|
||||
win_T *window = tp == curtab || tp->tp_firstwin == NULL ? firstwin
|
||||
: tp->tp_firstwin;
|
||||
if (switch_win(&oldcurwin, &oldtabpage, window, tp, true) == OK) {
|
||||
// look up the variable
|
||||
// Let gettabvar({nr}, "") return the "t:" dictionary.
|
||||
|
Reference in New Issue
Block a user