Improved errors appearance

This commit is contained in:
Marcin Kurczewski 2014-12-20 12:12:58 +01:00
parent ea979eb7fc
commit 7324d6a2d9

View File

@ -723,7 +723,7 @@ function! s:Ematch(...)
if delim !=# '/' && delim !=# '?' if delim !=# '/' && delim !=# '?'
let v:errmsg= "The delimiter `" . delim . "' isn't available, use `/' ." let v:errmsg= "The delimiter `" . delim . "' isn't available, use `/' ."
echo v:errmsg echohl WarningMsg | echo v:errmsg
return return
endif endif
@ -769,8 +769,7 @@ function! s:Ematch(...)
if v:errmsg ==# '' if v:errmsg ==# ''
redraw! redraw!
else else
echo 'M' . string echohl WarningMsg | echo v:errmsg
echo v:errmsg
endif endif
if delim == '?' if delim == '?'
@ -793,7 +792,7 @@ function! s:Esubstitute(...) range
let rxp=substitute(rxp, 'delim', delim, "g") let rxp=substitute(rxp, 'delim', delim, "g")
if string !~# rxp if string !~# rxp
if s:eglobal_working==0 if s:eglobal_working==0
echo 'Invalid arguments S' . a:1 echohl WarningMsg | echo 'Invalid arguments S' . a:1
endif endif
return return
endif endif
@ -851,10 +850,10 @@ function! s:Esubstitute(...) range
if confirmoption==0 if confirmoption==0
if v:errmsg==# '' if v:errmsg==# ''
if v:statusmsg !=# '' if v:statusmsg !=# ''
echo v:statusmsg echohl WarningMsg | echo v:statusmsg
endif endif
else else
echo v:errmsg echohl WarningMsg | echo v:errmsg
endif endif
endif endif
endif endif
@ -967,7 +966,7 @@ function! s:GetDelim(str)
return delim return delim
endif endif
let v:errmsg = "The delimiter `" . delim . "' isn't available, use " . valid let v:errmsg = "The delimiter `" . delim . "' isn't available, use " . valid
echo v:errmsg echohl WarningMsg | echo v:errmsg
return '' return ''
endfunction endfunction
"end s:GetDelim() "end s:GetDelim()