From: Christian Brabandt Date: Mon, 30 Mar 2026 10:12:03 +0000 (+0000) Subject: runtime(typeset): Use fnameescape() for the :lcd command X-Git-Tag: v9.2.0273~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa5c9310f51400643c82f5ce41b1070f362a44f1;p=thirdparty%2Fvim.git runtime(typeset): Use fnameescape() for the :lcd command Problem: runtime(typeset) does not escape the detected directory Solution: Use fnameescape() (MichaƂ Majchrowicz) fyi @lifepillar Signed-off-by: Christian Brabandt --- diff --git a/runtime/autoload/typeset.vim b/runtime/autoload/typeset.vim index 14bbcf03e2..3280cb4efd 100644 --- a/runtime/autoload/typeset.vim +++ b/runtime/autoload/typeset.vim @@ -3,6 +3,8 @@ vim9script # Language: Generic TeX typesetting engine # Maintainer: Nicola Vitacolonna # 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