Hello VIM Developers, According to the help, v:warningmsg contains the last given warning message. I've encountered multiple VIM warnings which do not update this variable:
vim -N -u NONE :setl ro :normal! oFoobar W10: Warning: Changing a readonly file-- INSERT -- :echo v:warningmsg " I would have expected that v:warningmsg now contains W10: ... /Foo search hit BOTTOM, continuing at TOP :echo v:warningmsg search hit BOTTOM, continuing at TOP " OK here, the wrapscan message sets v:warningmsg as expected. :w foo W10: Warning: Changing a readonly file :echo v:warningmsg search hit BOTTOM, continuing at TOP " v:warningmsg not set, still contains the old warning. :normal! oMore text :!echo "Changed" >> foo [No write since last change] W12: Warning: File "foo" has changed and the buffer was changed in Vim as well See ":help W12" for more info. [O]K, (L)oad File: :echo v:warningmsg search hit BOTTOM, continuing at TOP " It's not just W10, W12 also doesn't set v:warningmsg. I can reproduce this with VIM 7.2.127 on Linux and the default VIM 7.0 - 7.2 on Windows. -- regards, ingo -- -- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ -- --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
