Ingo Karkat wrote:

> 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.

I'll add it to the todo list.  Note that you need to mention every
message you are missing, there probably is no generic solution.

-- 
Why is it called "Windows"?  "Gates" would be more appropriate...

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui