Remove ANSI escapes from stderr as well
This commit is contained in:
parent
72794b36d9
commit
77b06741ef
@ -540,13 +540,14 @@ function! fireplace#quickfix_for(stacktrace) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:output_response(response) abort
|
function! s:output_response(response) abort
|
||||||
|
let substitution_pat = '\e\[[0-9;]*m\|\r\|\n$'
|
||||||
if get(a:response, 'err', '') !=# ''
|
if get(a:response, 'err', '') !=# ''
|
||||||
echohl ErrorMSG
|
echohl ErrorMSG
|
||||||
echo substitute(a:response.err, '\r\|\n$', '', 'g')
|
echo substitute(a:response.err, substitution_pat, '', 'g')
|
||||||
echohl NONE
|
echohl NONE
|
||||||
endif
|
endif
|
||||||
if get(a:response, 'out', '') !=# ''
|
if get(a:response, 'out', '') !=# ''
|
||||||
echo substitute(a:response.out, '\e\[[0-9;]\+m\|\r\|\n$', '', 'g')
|
echo substitute(a:response.out, substitution_pat, '', 'g')
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user