]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(context): use fnameescape() for the Log command
authorChristian Brabandt <cb@256bit.org>
Mon, 30 Mar 2026 09:58:07 +0000 (09:58 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 30 Mar 2026 09:58:07 +0000 (09:58 +0000)
Problem:  runtime(context) does not escape the detected log file
Solution: Use fnameescape() (MichaƂ Majchrowicz)

fyi @lifepillar

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

index 5736406a8d243de04a44e26a7ec26edfabcbbf72..6b013f2a7b6620059940ce1e251222a2da5ef731 100644 (file)
@@ -4,6 +4,8 @@ vim9script
 # Maintainer:         Nicola Vitacolonna <nvitacolonna@gmail.com>
 # Former Maintainers: Nikolai Weibull <now@bitwi.se>
 # Latest Revision:    2026 Feb 03
+# Last Change:
+# 2026 Mar 30 by Vim project: Use fnameescape for the Log command
 
 # Typesetting {{{
 import autoload './typeset.vim'
@@ -33,7 +35,7 @@ export def Log(bufname: string)
   var logpath = typeset.LogPath(bufname)
 
   if filereadable(logpath)
-    execute 'edit' typeset.LogPath(bufname)
+    execute 'edit' .. fnameescape(typeset.LogPath(bufname))
     return
   endif