diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-06 15:21:10 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-06 15:21:10 +0200 |
commit | 1950c3529b16acd21ee5770b422d633f24d192a3 (patch) | |
tree | 0710904eec725a784f02093d972dde0fe6c41329 /src/eval.c | |
parent | 56be950094e10e68da1f901ba971c5f3e9821685 (diff) | |
download | vim-git-1950c3529b16acd21ee5770b422d633f24d192a3.tar.gz |
Fixed memory leak in ":ownsyntax".
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/eval.c b/src/eval.c index ca9389fb3..2e5b8766c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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 * |