runtime(compilers): ensure compiler! sets global options (#14336)
Previously some options were only set locally by &l:makeprg/errorformat This suffices for :compiler (without a trailing bang) but falls short for :compiler! that sets &g:makeprg/errorformat as well Also apply kind suggestions by @dkearns and @lifepillar Signed-off-by: Konfekt <Konfekt@users.noreply.github.com> Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Mono C# Compiler
|
||||
" Maintainer: Jarek Sobiecki <harijari@go2.pl>
|
||||
" Last Updated By: Peter Collingbourne
|
||||
" Latest Revision: 2012 Jul 19
|
||||
" Compiler: Mono C# Compiler
|
||||
" Maintainer: Jarek Sobiecki <harijari@go2.pl>
|
||||
" Contributors: Peter Collingbourne and Enno Nagel
|
||||
" Last Change: 2024 Mar 29
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@ -12,7 +12,12 @@ let current_compiler = "mcs"
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal errorformat=
|
||||
if exists(":CompilerSet") != 2 " Older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=mcs
|
||||
CompilerSet errorformat=
|
||||
\%D%.%#Project\ \"%f/%[%^/\"]%#\"%.%#,
|
||||
\%X%.%#Done\ building\ project\ \"%f/%[%^/\"]%#\"%.%#,
|
||||
\%-G%\\s%.%#,
|
||||
|
||||
Reference in New Issue
Block a user