Mercurial > vim
comparison src/eval.c @ 7042:e8eccb9621f7 v7.4.834
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 25 16:19:05 2015 +0200
patch 7.4.834
Problem: gettabvar() doesn't work after Vim start. (Szymon Wrozynski)
Solution: Handle first window in tab still being NULL. (Christian Brabandt)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 25 Aug 2015 17:20:27 +0200 |
parents | db0328a2fa2a |
children | fd409a0800fd |
comparison
equal
deleted
inserted
replaced
7041:0c84d2003fa6 | 7042:e8eccb9621f7 |
---|---|
12289 tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL)); | 12289 tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL)); |
12290 if (tp != NULL && varname != NULL) | 12290 if (tp != NULL && varname != NULL) |
12291 { | 12291 { |
12292 /* Set tp to be our tabpage, temporarily. Also set the window to the | 12292 /* Set tp to be our tabpage, temporarily. Also set the window to the |
12293 * first window in the tabpage, otherwise the window is not valid. */ | 12293 * first window in the tabpage, otherwise the window is not valid. */ |
12294 if (switch_win(&oldcurwin, &oldtabpage, tp->tp_firstwin, tp, TRUE) | 12294 if (switch_win(&oldcurwin, &oldtabpage, |
12295 tp->tp_firstwin == NULL ? firstwin : tp->tp_firstwin, tp, TRUE) | |
12295 == OK) | 12296 == OK) |
12296 { | 12297 { |
12297 /* look up the variable */ | 12298 /* look up the variable */ |
12298 /* Let gettabvar({nr}, "") return the "t:" dictionary. */ | 12299 /* Let gettabvar({nr}, "") return the "t:" dictionary. */ |
12299 v = find_var_in_ht(&tp->tp_vars->dv_hashtab, 't', varname, FALSE); | 12300 v = find_var_in_ht(&tp->tp_vars->dv_hashtab, 't', varname, FALSE); |