summaryrefslogtreecommitdiffstats
path: root/runtime/compiler/mcs.vim
diff options
context:
space:
mode:
authorEnno <Konfekt@users.noreply.github.com>2024-03-31 18:37:05 +0200
committerGitHub <noreply@github.com>2024-03-31 18:37:05 +0200
commit18d730d7b5728c8f87272ac7047d86354013eeb9 (patch)
treee93b225fab97bdb446be775f244a2c273f58e62f /runtime/compiler/mcs.vim
parent80aabaab6636faa7cec461acc4b1fcc3a4c89376 (diff)
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>
Diffstat (limited to 'runtime/compiler/mcs.vim')
-rw-r--r--runtime/compiler/mcs.vim15
1 files changed, 10 insertions, 5 deletions
diff --git a/runtime/compiler/mcs.vim b/runtime/compiler/mcs.vim
index c606586870..94a1848d4a 100644
--- a/runtime/compiler/mcs.vim
+++ b/runtime/compiler/mcs.vim
@@ -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%.%#,