Hi,
I just received a bug for vim-airline for which I suspect this might be
caused by a vim particularity. The bug is here:
https://github.com/vim-airline/vim-airline/issues/1989
The symptom is, that if one uses 'R' and replaces a bit, and right after
that presses 'r' the statusline switches to 'REPLACE' mode, which is
wrong. However the next time you press 'r', it won't switch to
'REPLACE'. However I see this behaviour only on Windows gvim, not in
the terminal.
The whole mode, is always updated every time the statusline is
re-evaluated, by throwing a function airline#check_mode into the
statusline.
What this function does essentially is check `mode(1)` and update the
string that will be displayed (and if the mode changes, it might as well
update a couple of highlighting groups).
Now, I did debug this a bit and the thing is, that apparently `mode(1)`
keeps returning `R`, even so, it should return 'n' after pressing `r`. I
am a bit at loss at why this happens and I looked at the source f_mode()
but don't see what would cause this. In nv_replace I see that sometimes
the State will be updated to `REPLACE` for the 'r' command and I guess
this might be the cause for that, perhaps because it recursively forces
a screen update, but I am wondering why I only see this with gvim and
I don't see this behaviour with a `vim --clean -c'set stl=%{mode(1)}'`.
Anybody has an idea how to "fix" this behaviour? However, I am not sure
it is worth the trouble at all.
Best,
Christian
--
Als ich die Lust zur Sinnnlichkeit entdeckte, habe ich an Gott zu
glauben aufgehört. Denn er stahl mir die Erde.
-- Simone de Beauvoir
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20191031091912.GM24930%40256bit.org.