mirror of
https://github.com/dense-analysis/ale.git
synced 2026-09-03 21:36:55 +08:00
Issue 2598: Addtional ^M characters on Windows
Windows may insert carriage return line endings, which ALE does not handle well. These characters should not be displayed. Adds a line to remove these characters for all messages.
This commit is contained in:
@@ -263,6 +263,8 @@ function! ale#GetLocItemMessage(item, format_string) abort
|
|||||||
let l:msg = substitute(l:msg, '\v\%([^\%]*)code([^\%]*)\%', l:code_repl, 'g')
|
let l:msg = substitute(l:msg, '\v\%([^\%]*)code([^\%]*)\%', l:code_repl, '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
|
||||||
|
|||||||
Reference in New Issue
Block a user