]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(typeset): Use fnameescape() for the :lcd command
authorChristian Brabandt <cb@256bit.org>
Mon, 30 Mar 2026 10:12:03 +0000 (10:12 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 30 Mar 2026 10:12:03 +0000 (10:12 +0000)
Problem:  runtime(typeset) does not escape the detected directory
Solution: Use fnameescape() (MichaƂ Majchrowicz)

fyi @lifepillar

Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/typeset.vim

index 14bbcf03e2fad4803709fa938191d875e1e6482a..3280cb4efdaafebb89366c0ba29c923c050aeed0 100644 (file)
@@ -3,6 +3,8 @@ vim9script
 # Language:           Generic TeX typesetting engine
 # Maintainer:         Nicola Vitacolonna <nvitacolonna@gmail.com>
 # Latest Revision:    2026 Feb 19
+# Last Change:
+# 2026 Mar 30 by Vim project: Use fnameescape for the ProcessOutput command
 
 # Constants and helpers {{{
 const SLASH = !exists("+shellslash") || &shellslash ? '/' : '\'
@@ -60,7 +62,7 @@ def ProcessOutput(qfid: number, wd: string, efm: string, ch: channel, msg: strin
   endif
 
   # Make sure the working directory is correct
-  silent execute "lcd" wd
+  silent execute "lcd" .. fnameescape(wd)
   setqflist([], 'a', {'id': qfid, 'lines': [msg], 'efm': efm})
   silent lcd -
 enddef