If I type:
:echoerr "test error"
I simply get the message printed (with red background):
However, inside a function:
function! Printerror() echoerr "test error" endfunction
I get additional (and in this particular case) unwanted extra lines:
Error detected while processing function Printerror: line 1: test error Press ENTER or type command to continue
How can I supress the additional lines produced in a function?