From aa5c9310f51400643c82f5ce41b1070f362a44f1 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Mon, 30 Mar 2026 10:12:03 +0000 Subject: [PATCH] runtime(typeset): Use fnameescape() for the :lcd command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: runtime(typeset) does not escape the detected directory Solution: Use fnameescape() (MichaƂ Majchrowicz) fyi @lifepillar Signed-off-by: Christian Brabandt --- runtime/autoload/typeset.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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