2015-05-25 1:12 GMT+03:00 Justin M. Keyes <justinkz@gmail.com>:
> On Sun, May 24, 2015 at 5:19 AM, Nicola <nvitacolonna@gmail.com> wrote:
>> Hi,
>> am I right that <C-w><C-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-w>o <C-w>o:call RefreshStatusLines()<CR>
>> nnoremap <C-w><C-w> <C-w>o:call RefreshStatusLines()<CR>
>>
>> I was wondering whether there is a better way to detect when the user makes
>> the active window the only visible one.
>
> No such event. But you can force statusline redraw by assigning an
> option to itself:
>
> let &readonly=&readonly
>
> Although, I just noticed that Vim has a :redrawstatus command. Is
> there any need for the "let &ro=&ro" hack mentioned in ":help
> 'statusline'", given the existence of :redrawstatus?
It is not needed. Status line redraw is being triggered by closing the
window, no redraw is the problem of the custom status line, not Vim.
RefreshStatusLines function is thus obviously *not* being used from
the &statusline in this case.
I know this because powerline does *not* use anything, but "switch
highlight group" and "display raw text" statusline segments and it
still immediately occupies all space after closing the window (== it
does not use %= segments, so to occupy all space Vim must recompute
status line or it will be displayed using the previous window size).
>
>
> Justin M. Keyes
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sunday, May 24, 2015
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment