Re: Does C-wC-o trigger any event?

2015-05-27 Thread Nicola
On 2015-05-26 18:51:07 +, Nikolay Pavlov said: I cannot use winnr() inside BuildStatusLine() or in the context of %!. Why do you think so? Inside %{…%} winnr() will report window number for the current status line. But inside %! it will report current window number: An oversight on my

Re: Does C-wC-o trigger any event?

2015-05-27 Thread Nicola
On 2015-05-26 19:10:30 +, Nikolay Pavlov said: All works as expected (including C-wC-o!) if I open windows with :new, :vnew, etc... But when I split a window, say with C-wC-s, SetupLocalStatusLine() is not called, which means that somehow the current l:statusline is re-used. The rest is

Re: Does C-wC-o trigger any event?

2015-05-26 Thread Nicola
On 2015-05-26 04:59:00 +, Nikolay Pavlov said: Default value from l:statusline is g:statusline (actually, pseudo-value “no value set, fall back to g:statusline”). If you set g:statusline to `%!BuildNewStatusLine()` and run `RefreshStatusLines()` inside then this function will be run only

Re: Does C-wC-o trigger any event?

2015-05-26 Thread Nikolay Pavlov
2015-05-26 12:04 GMT+03:00 Nicola nvitacolo...@gmail.com: On 2015-05-26 04:59:00 +, Nikolay Pavlov said: Default value from l:statusline is g:statusline (actually, pseudo-value “no value set, fall back to g:statusline”). If you set g:statusline to `%!BuildNewStatusLine()` and run

Re: Does C-wC-o trigger any event?

2015-05-26 Thread Nikolay Pavlov
2015-05-26 20:32 GMT+03:00 Nicola nvitacolo...@gmail.com: On 2015-05-26 09:04:39 +, Nicola said: On 2015-05-26 04:59:00 +, Nikolay Pavlov said: Default value from l:statusline is g:statusline (actually, pseudo-value “no value set, fall back to g:statusline”). If you set g:statusline

Re: Does C-wC-o trigger any event?

2015-05-26 Thread Nicola
On 2015-05-26 09:04:39 +, Nicola said: On 2015-05-26 04:59:00 +, Nikolay Pavlov said: Default value from l:statusline is g:statusline (actually, pseudo-value “no value set, fall back to g:statusline”). If you set g:statusline to `%!BuildNewStatusLine()` and run `RefreshStatusLines()`

Re: Does C-wC-o trigger any event?

2015-05-25 Thread Nicola
On 2015-05-25 05:12:21 +, Nikolay Pavlov said: 2015-05-25 1:12 GMT+03:00 Justin M. Keyes justi...@gmail.com: On Sun, May 24, 2015 at 5:19 AM, Nicola nvitacolo...@gmail.com wrote: Hi, am I right that C-wC-o does not trigger any event? I have a custom status line, which does not get updated

Re: Does C-wC-o trigger any event?

2015-05-25 Thread Nikolay Pavlov
2015-05-25 22:31 GMT+03:00 Nikolay Pavlov zyx@gmail.com: 2015-05-25 16:40 GMT+03:00 Nicola nvitacolo...@gmail.com: On 2015-05-25 05:12:21 +, Nikolay Pavlov said: 2015-05-25 1:12 GMT+03:00 Justin M. Keyes justi...@gmail.com: On Sun, May 24, 2015 at 5:19 AM, Nicola

Re: Does C-wC-o trigger any event?

2015-05-25 Thread Nikolay Pavlov
2015-05-25 16:40 GMT+03:00 Nicola nvitacolo...@gmail.com: On 2015-05-25 05:12:21 +, Nikolay Pavlov said: 2015-05-25 1:12 GMT+03:00 Justin M. Keyes justi...@gmail.com: On Sun, May 24, 2015 at 5:19 AM, Nicola nvitacolo...@gmail.com wrote: Hi, am I right that C-wC-o does not trigger any

Re: Does C-wC-o trigger any event?

2015-05-25 Thread Nicola
On 2015-05-25 19:31:48 +, Nikolay Pavlov said: call setwinvar(nr, 'statusline', '%!BuildStatusLine(' . winwidth(nr) . ',' . winbufnr(nr) . ',' . (nr == winnr()) . ')') 1. winwidth(nr) can be called inside BuildStatusLine. Same for other arguments. Just provide it with `nr`: this is a

Re: Does C-wC-o trigger any event?

2015-05-25 Thread Nikolay Pavlov
2015-05-26 0:54 GMT+03:00 Nicola nvitacolo...@gmail.com: On 2015-05-25 19:31:48 +, Nikolay Pavlov said: call setwinvar(nr, 'statusline', '%!BuildStatusLine(' . winwidth(nr) . ',' . winbufnr(nr) . ',' . (nr == winnr()) . ')') 1. winwidth(nr) can be called inside BuildStatusLine. Same for

Does C-wC-o trigger any event?

2015-05-24 Thread Nicola
Hi, am I right that C-wC-o does not trigger any event? I have a custom status line, which does not get updated when I close all other windows. For now, I have this workaround: nnoremap C-wo C-wo:call RefreshStatusLines()CR nnoremap C-wC-w C-wo:call

Re: Does C-wC-o trigger any event?

2015-05-24 Thread Justin M. Keyes
On Sun, May 24, 2015 at 5:19 AM, Nicola nvitacolo...@gmail.com wrote: Hi, am I right that C-wC-o does not trigger any event? I have a custom status line, which does not get updated when I close all other windows. For now, I have this workaround: nnoremap C-wo C-wo:call

Re: Does C-wC-o trigger any event?

2015-05-24 Thread Nikolay Pavlov
2015-05-25 1:12 GMT+03:00 Justin M. Keyes justi...@gmail.com: On Sun, May 24, 2015 at 5:19 AM, Nicola nvitacolo...@gmail.com wrote: Hi, am I right that C-wC-o does not trigger any event? I have a custom status line, which does not get updated when I close all other windows. For now, I have