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 <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2026-03-30 10:12:03 +00:00
parent 84a8ee4353
commit aa5c9310f5
+3 -1
View 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