Closed moll closed 11 years ago
On Mo, 29 Jul 2013, Andri Möll wrote:
It looks as if
:ColorToggle
thinks it's on when in fact it was set on in another buffer. You can repeat it roughly this way:
- Open Vim
- Split vertically
:e A.css
:ColorToggle
- Jump to other split
:e B.css
:ColorToggle
And nothing happens. You'll have to toggle twice to get highlighting in the other file.
Thanks. Problem is, ColorToggle worked globally, and does not consider the actual window. I think, this is fixed now.
regards,
Ein unnütz Leben ist ein früher Tod. -- Johann Wolfgang von Goethe (Iphigenie)
Cool.
From the diff it looks like you switched the variables to use window local variables. I'm a bit confused — how do you envision this to work? In other issues we talked about making coloring be per-buffer (usually equivalent to per-file). Wouldn't it make more sense to store state in buffer variables?
Hi Andri!
On Di, 30 Jul 2013, Andri Möll wrote:
Cool.
From the diff it looks like you switched the variables to use window local variables. I'm a bit confused — how do you envision this to work? In other issues we talked about making coloring be per-buffer (usually equivalent to per-file). Wouldn't it make more sense to store state in buffer variables?
matching() is window-local, so we must use window-local variables. Otherwise, when opening a new window with the same file, the buffer local variable would be still alive, while the matching isn't active.
Liebe Grüße
Denn worin besteht die Barbarei anders als darin, daß man das Vortreffliche nicht anerkennt. -- Johann Wolfgang von Goethe (Zu J. P. Eckermann)
I'm not familiar with that part of Vim, but if you're saying that Vim sets such syntax highlighting per window and not per buffer, then my god, Vim is nuts.
It looks as if
:ColorToggle
thinks it's on when in fact it was set on in another buffer. You can repeat it roughly this way::e A.css
:ColorToggle
:e B.css
:ColorToggle
And nothing happens. You'll have to toggle twice to get highlighting in the other file.