aboutsummaryrefslogtreecommitdiff
path: root/runtime/compiler/context.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-06 05:44:37 +0800
committerGitHub <noreply@github.com>2024-04-06 05:44:37 +0800
commit66568ed4521972cd34d9f635511b979481e2dc01 (patch)
treee63a099ea87db2f96b74c11bffbe1f6833a51462 /runtime/compiler/context.vim
parent7098341387346a95647e3521a4c30e904fc0ac50 (diff)
downloadrneovim-66568ed4521972cd34d9f635511b979481e2dc01.tar.gz
rneovim-66568ed4521972cd34d9f635511b979481e2dc01.tar.bz2
rneovim-66568ed4521972cd34d9f635511b979481e2dc01.zip
vim-patch:b73faa1c02d0 (#28193)
runtime: fix :compiler leaving behind a g:makeprg variable (vim/vim#14414) Problem: :compiler may leave behind a g:makeprg variable after vim/vim#14336. Solution: Use a script local variable. https://github.com/vim/vim/commit/b73faa1c02d0911a60bddd1ba343cf620f2cd124 Also apply previously omitted change to compiler/context.vim.
Diffstat (limited to 'runtime/compiler/context.vim')
-rw-r--r--runtime/compiler/context.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/compiler/context.vim b/runtime/compiler/context.vim
index fa26269941..3d626ffa60 100644
--- a/runtime/compiler/context.vim
+++ b/runtime/compiler/context.vim
@@ -16,11 +16,12 @@ if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) ||
let current_compiler = 'context'
" The following assumes that the current working directory is set to the
" directory of the file to be typeset
- let &l:makeprg = get(b:, 'context_mtxrun', get(g:, 'context_mtxrun', 'mtxrun'))
+ let s:makeprg = get(b:, 'context_mtxrun', get(g:, 'context_mtxrun', 'mtxrun'))
\ . ' --script context --autogenerate --nonstopmode --synctex='
\ . (get(b:, 'context_synctex', get(g:, 'context_synctex', 0)) ? '1' : '0')
\ . ' ' . get(b:, 'context_extra_options', get(g:, 'context_extra_options', ''))
\ . ' ' . shellescape(expand('%:p:t'))
+ execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ')
else
let current_compiler = 'make'
endif