Merge pull request #3078 from jgehrig/jg-issue2958

Issue 2958: Addtional ^M characters on Windows
This commit is contained in:
w0rp 2020-08-31 08:31:44 +01:00 committed by GitHub
commit 4a91f92f28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -263,6 +263,8 @@ function! ale#GetLocItemMessage(item, format_string) abort
let l:msg = substitute(l:msg, '\V%linter%', '\=l:linter_name', 'g') let l:msg = substitute(l:msg, '\V%linter%', '\=l:linter_name', 'g')
" Replace %s with the text. " Replace %s with the text.
let l:msg = substitute(l:msg, '\V%s', '\=a:item.text', 'g') let l:msg = substitute(l:msg, '\V%s', '\=a:item.text', 'g')
" Windows may insert carriage return line endings (^M), strip these characters.
let l:msg = substitute(l:msg, '\r', '', 'g')
return l:msg return l:msg
endfunction endfunction