Strip all carriage returns out of output

Closes #38.
This commit is contained in:
Tim Pope 2013-01-15 20:17:59 -05:00
parent fbd8a0844a
commit 6f93e99ede

View File

@ -401,11 +401,11 @@ endfunction
function! s:output_response(response) abort function! s:output_response(response) abort
if get(a:response, 'err', '') !=# '' if get(a:response, 'err', '') !=# ''
echohl ErrorMSG echohl ErrorMSG
echo substitute(a:response.err, '\n$', '', '') echo substitute(a:response.err, '\r\|\n$', '', 'g')
echohl NONE echohl NONE
endif endif
if get(a:response, 'out', '') !=# '' if get(a:response, 'out', '') !=# ''
echo substitute(a:response.out, '\n$', '', '') echo substitute(a:response.out, '\r\|\n$', '', 'g')
endif endif
endfunction endfunction