aboutsummaryrefslogtreecommitdiff
path: root/runtime/compiler/powershell.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-03-31 18:38:55 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-04-01 00:48:30 +0200
commit6b9a808d13b0d2857228a47511355fd6e12709ed (patch)
tree2123a15f3c9da5ea2726279df2e807fa5528e5ee /runtime/compiler/powershell.vim
parent1570cfb6384e972a8f2797a75cd2515e53ec2cf0 (diff)
downloadrneovim-6b9a808d13b0d2857228a47511355fd6e12709ed.tar.gz
rneovim-6b9a808d13b0d2857228a47511355fd6e12709ed.tar.bz2
rneovim-6b9a808d13b0d2857228a47511355fd6e12709ed.zip
vim-patch:18d730d7b572
runtime(compilers): ensure compiler! sets global options (vim/vim#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 https://github.com/vim/vim/commit/18d730d7b5728c8f87272ac7047d86354013eeb9 omit context.vim (vim9script only) Co-authored-by: Enno <Konfekt@users.noreply.github.com>
Diffstat (limited to 'runtime/compiler/powershell.vim')
-rw-r--r--runtime/compiler/powershell.vim7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/compiler/powershell.vim b/runtime/compiler/powershell.vim
index 45d5ec2191..445a2f6d97 100644
--- a/runtime/compiler/powershell.vim
+++ b/runtime/compiler/powershell.vim
@@ -1,7 +1,8 @@
" 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
if exists("current_compiler")
finish
@@ -37,7 +38,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 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 +51,8 @@ let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S'
" + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException
" + FullyQualifiedErrorId : CommandNotFoundException
+execute 'CompilerSet makeprg=' .. escape(makeprg, ' ')
+
" Showing error in context with underlining.
CompilerSet errorformat=%+G+%m
" Error summary.