diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-14 11:20:59 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-06 21:56:38 -0400 |
commit | 059986e03827c24e2fa1ac2a3b66743dfed9a8d9 (patch) | |
tree | 5ce912423f7fbe4f666d78630c7ee412e50bd683 /src/nvim/eval.c | |
parent | d6711685747681e006f996893e85c998d192b2eb (diff) | |
download | rneovim-059986e03827c24e2fa1ac2a3b66743dfed9a8d9.tar.gz rneovim-059986e03827c24e2fa1ac2a3b66743dfed9a8d9.tar.bz2 rneovim-059986e03827c24e2fa1ac2a3b66743dfed9a8d9.zip |
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)
https://github.com/vim/vim/commit/816968defc8ae79eb7e2319e991e74661be8d750
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 3abc39e7bf..b495e591d2 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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. |