mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 07:18:17 +00:00
vim-patch:7.4.442
Problem: Using unitinialized variable. Solution: Pass the first window of the tabpage. https://code.google.com/p/vim/source/detail?r=v7-4-442
This commit is contained in:
@@ -9603,7 +9603,7 @@ static void f_getregtype(typval_T *argvars, typval_T *rettv)
|
|||||||
*/
|
*/
|
||||||
static void f_gettabvar(typval_T *argvars, typval_T *rettv)
|
static void f_gettabvar(typval_T *argvars, typval_T *rettv)
|
||||||
{
|
{
|
||||||
win_T *win, *oldcurwin;
|
win_T *oldcurwin;
|
||||||
tabpage_T *tp, *oldtabpage;
|
tabpage_T *tp, *oldtabpage;
|
||||||
dictitem_T *v;
|
dictitem_T *v;
|
||||||
char_u *varname;
|
char_u *varname;
|
||||||
@@ -9615,9 +9615,9 @@ static void f_gettabvar(typval_T *argvars, typval_T *rettv)
|
|||||||
varname = get_tv_string_chk(&argvars[1]);
|
varname = get_tv_string_chk(&argvars[1]);
|
||||||
tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
|
tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
|
||||||
if (tp != NULL && varname != NULL) {
|
if (tp != NULL && varname != NULL) {
|
||||||
/* Set curwin to be our win, temporarily. Also set the tabpage,
|
/* Set tp to be our tabpage, temporarily. Also set the window to the
|
||||||
* otherwise the window is not valid. */
|
* first window in the tabpage, otherwise the window is not valid. */
|
||||||
switch_win(&oldcurwin, &oldtabpage, win, tp, TRUE);
|
switch_win(&oldcurwin, &oldtabpage, tp->tp_firstwin, tp, TRUE);
|
||||||
|
|
||||||
/* look up the variable */
|
/* look up the variable */
|
||||||
/* Let gettabvar({nr}, "") return the "t:" dictionary. */
|
/* Let gettabvar({nr}, "") return the "t:" dictionary. */
|
||||||
|
@@ -287,7 +287,7 @@ static int included_patches[] = {
|
|||||||
//445,
|
//445,
|
||||||
444,
|
444,
|
||||||
//443,
|
//443,
|
||||||
//442,
|
442,
|
||||||
//441,
|
//441,
|
||||||
440,
|
440,
|
||||||
439,
|
439,
|
||||||
|
Reference in New Issue
Block a user