summaryrefslogtreecommitdiffstats
path: root/runtime/compiler/powershell.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:10:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:10:58 +0000
commit08f9ab81d4c476bdca6e23aba00f615eb811d929 (patch)
treece8796843acf3fd4f1ab43490d74f56131772037 /runtime/compiler/powershell.vim
parentAdding debian version 2:9.1.0199-1. (diff)
downloadvim-08f9ab81d4c476bdca6e23aba00f615eb811d929.tar.xz
vim-08f9ab81d4c476bdca6e23aba00f615eb811d929.zip
Merging upstream version 2:9.1.0374.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/compiler/powershell.vim')
-rw-r--r--runtime/compiler/powershell.vim13
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/compiler/powershell.vim b/runtime/compiler/powershell.vim
index 45d5ec2..821fea4 100644
--- a/runtime/compiler/powershell.vim
+++ b/runtime/compiler/powershell.vim
@@ -1,17 +1,16 @@
" Vim compiler file
" Compiler: powershell
" URL: https://github.com/PProvost/vim-ps1
-" Last Change: 2020 Mar 30
+" Contributors: Enno Nagel
+" Last Change: 2024 Mar 29
+" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
+" 2024 Apr 05 by The Vim Project (avoid leaving behind g:makeprg)
if exists("current_compiler")
finish
endif
let current_compiler = "powershell"
-if exists(":CompilerSet") != 2 " older Vim always used :setlocal
- command -nargs=* CompilerSet setlocal <args>
-endif
-
let s:cpo_save = &cpo
set cpo-=C
@@ -37,7 +36,7 @@ let g:ps1_efm_show_error_categories = get(g:, 'ps1_efm_show_error_categories', 0
" Use absolute path because powershell requires explicit relative paths
" (./file.ps1 is okay, but # expands to file.ps1)
-let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S'
+let s:makeprg = g:ps1_makeprg_cmd .. ' %:p:S'
" Parse file, line, char from callstacks:
" Write-Ouput : The term 'Write-Ouput' is not recognized as the name of a
@@ -50,6 +49,8 @@ let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S'
" + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException
" + FullyQualifiedErrorId : CommandNotFoundException
+execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ')
+
" Showing error in context with underlining.
CompilerSet errorformat=%+G+%m
" Error summary.