0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

Fixed memory leak in ":ownsyntax".

This commit is contained in:
Bram Moolenaar
2010-06-06 15:21:10 +02:00
parent 56be950094
commit 1950c3529b
4 changed files with 27 additions and 26 deletions

View File

@@ -3884,11 +3884,6 @@ get_user_var_name(xp, idx)
++hi;
return cat_prefix_varname('w', hi->hi_key);
}
if (wdone == ht->ht_used)
{
++wdone;
return (char_u *)"w:ownsyntax";
}
#ifdef FEAT_WINDOWS
/* t: variables */
@@ -18758,18 +18753,6 @@ get_var_tv(name, len, rettv, verbose)
tv = &atv;
}
if (STRCMP(name, "w:ownsyntax") == 0)
{
atv.v_type = VAR_NUMBER;
#ifdef FEAT_SYN_HL
atv.vval.v_number = (curwin->w_s != &curwin->w_buffer->b_s) ? 1 : 0;
#else
atv.vval.v_number = 0;
#endif
tv = &atv;
}
/*
* Check for user-defined variables.
*/
@@ -19292,6 +19275,7 @@ find_var_ht(name, varname)
/*
* Get the string value of a (global/local) variable.
* Note: see get_tv_string() for how long the pointer remains valid.
* Returns NULL when it doesn't exist.
*/
char_u *