vim-patch:84baba3: runtime(compiler): do not override &l:makeprg on :compiler! (#36470)

closes: vim/vim#18686

84baba329a

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
This commit is contained in:
zeertzjq
2025-11-07 08:22:50 +08:00
committed by GitHub
parent f2bfde9140
commit af5ac171bd
4 changed files with 16 additions and 14 deletions

View File

@@ -3,6 +3,7 @@
" Maintainer: @pbnj-dragon
" Last Change: 2024 Nov 07
" 2024 Nov 19 by the Vim Project (properly escape makeprg setting)
" 2025 Nov 06 by the Vim Project (do not set buffer-local makeprg)
if exists("current_compiler") | finish | endif
let current_compiler = "ruff"
@@ -11,9 +12,9 @@ let s:cpo_save = &cpo
set cpo&vim
" CompilerSet makeprg=ruff
let &l:makeprg= 'ruff check --output-format=concise '
\ ..get(b:, 'ruff_makeprg_params', get(g:, 'ruff_makeprg_params', '--preview'))
exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"')
exe 'CompilerSet makeprg=' .. escape('ruff check --output-format=concise '
\ ..get(b:, 'ruff_makeprg_params', get(g:, 'ruff_makeprg_params', '--preview')),
\ ' \|"')
CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f:
let &cpo = s:cpo_save