]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(new-tutor): escape tutor filename
authorAndrey Starodubtsev <andrey.starodubtsev@gmail.com>
Thu, 13 Nov 2025 21:49:20 +0000 (21:49 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 13 Nov 2025 21:49:20 +0000 (21:49 +0000)
If Vim is installed into the Windows "Program Files" directory the tutor
path name contains spaces and must therefore be quoted before passing to
:drop.

closes: #18742

Signed-off-by: Andrey Starodubtsev <andrey.starodubtsev@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/tutor.vim

index c3b5df37d941d3f47b75ec25cc99312d797b155e..a31f74680a761340fa1602fafcd4dfc7494de37d 100644 (file)
@@ -211,7 +211,7 @@ function! tutor#TutorCmd(tutor_name)
     endif
 
     call tutor#SetupVim()
-    exe "drop ".l:to_open
+    exe "drop ".fnameescape(l:to_open)
     call tutor#EnableInteractive(v:true)
 endfunction