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:
aiotter 2020-04-17 16:26:08 +09:00
parent 82f734a7c2
commit c525db8cb4
1 changed files with 1 additions and 1 deletions

View File

@ -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')