Closed graywh closed 13 years ago
Even after fixing that error, it doesn't seem to help with g:colors_name disappearing after changing 'bg'.
How did Bram let a change that's so backwards incompatible slip through!? Are you sure that's a feature and not a bug? I'll try to build a vim 7.3 sometime soon to QC this...
I get the same behavior in 7.2.330 and 7.0.305. That is,
let g:var = "foo" let var = "baz" " now g:var is 'baz'
Sure, that's a very different case than what you originally said, since you're actually in the global scope there (from what you showed, at least)... You said that this would change the global: let var = "foo" function! LocalVar() let var = "bar" endfunction echo var
In my currently available vim (vim 7.2.000), that prints "foo" as expected. It sounds like you're saying it prints "bar" in some versions of vim...
Oh, ok. That means something else is unlet-ing g:color_names when changing 'bg'.
"let var_name" will change the value of the global variable of the same name if it exists. Instead, use a local variable to temporary store 'colors_name' and 'syntax_cmd'.