mirror of https://github.com/dense-analysis/ale
Swap substitution order for echoed message
This prevents 'code' string in liter_name to be substituted by accident. Linters including pycodestyle have been affected by this problem.
This commit is contained in:
parent
82f734a7c2
commit
c525db8cb4
|
@ -258,9 +258,9 @@ function! ale#GetLocItemMessage(item, format_string) abort
|
|||
|
||||
" Replace special markers with certain information.
|
||||
" \=l:variable is used to avoid escaping issues.
|
||||
let l:msg = substitute(l:msg, '\v\%([^\%]*)code([^\%]*)\%', l:code_repl, 'g')
|
||||
let l:msg = substitute(l:msg, '\V%severity%', '\=l:severity', 'g')
|
||||
let l:msg = substitute(l:msg, '\V%linter%', '\=l:linter_name', 'g')
|
||||
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')
|
||||
|
||||
|
|
Loading…
Reference in New Issue