Closed lucy closed 1 year ago
Related: https://github.com/neovim/neovim/issues/22683 , mentions a potential fix
:redrawstatus
should redraw the commandline. Using :echo
instead of :redrawstatus
fixes the repro example, could that also apply to your lsp status indicator?In v0.8.3 the ruler is redrawn even without the :redrawstatus
:
let g:n = 0
function! T(t)
let g:n += 1
endfunction
call timer_start(1000, function('T'), {'repeat': -1})
set laststatus=1
set ruler
set rulerformat=%{g:n}
So I think the ruler being redrawn is actually a bug.
The fact that it was redrawn was a "bug", the timer redrawed it implicitly. This was fixed in #22547.
Nothing happens in the timer callback that should trigger a status redraw. Thus, if the user should want to update they should trigger it explicitly, in this case by :echo
?
I think with laststatus=0
or 1
and running redrawstatus
in the last window (when it has a ruler instead of a full statusline), it should actually redraw the ruler (regardless of what vim/earlier nvim did or didn't do). I think that is more readable and less surprising than :echo
(and more efficient in practice, unless plugins replicate a big-if statement for doing one or the other)
OK, let me know if I should re-open https://github.com/neovim/neovim/pull/22843. Or take it up with Bram?
our model has diverged from vim quite significantly. something like https://github.com/neovim/neovim/pull/22843 would be the fix for us.
our model has diverged from vim quite significantly.
The problem is present in vim as well (like OP mentioned), so perhaps it makes sense to propose the patch anyways? It seems compatible still with their status_redraw_curbuf()
.
Sure you (anyone) can post it on vim/vim if you want. The point was just we wanted get it done ourselves for 0.9 regardless.
Problem
Ruler doesn't seem to get updated on
:redrawstatus
if youset laststatus=1
. I encountered this because my lsp status indicator stopped working properly. This seems to also be broken in upstream vim but works in neovim v0.8.3.Steps to reproduce
Expected behavior
Counter in ruler should increment every 1000ms.
Neovim version (nvim -v)
NVIM v0.9.0-dev-1292+geac75a971d
Vim (not Nvim) behaves the same?
yes, surprisingly. VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Mar 21 2023 20:51:42) Included patches: 1-1420
Operating system/version
Arch in WSL
Terminal name/version
Windows Terminal
$TERM environment variable
xterm-256color
Installation
AUR