From 1c6b9354a825a0dbab310077dd05666b8e081974 Mon Sep 17 00:00:00 2001 From: John Gehrig Date: Thu, 26 Mar 2020 09:25:18 -0400 Subject: 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. --- autoload/ale.vim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'autoload/ale.vim') diff --git a/autoload/ale.vim b/autoload/ale.vim index ee1a0d54..6d0afb9e 100644 --- a/autoload/ale.vim +++ b/autoload/ale.vim @@ -263,6 +263,8 @@ function! ale#GetLocItemMessage(item, format_string) abort let l:msg = substitute(l:msg, '\v\%([^\%]*)code([^\%]*)\%', l:code_repl, 'g') " Replace %s with the text. 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 endfunction -- cgit v1.2.3