From 46cd8769933f9bf538dcf0d6ad8414157c9a301e Mon Sep 17 00:00:00 2001 From: Ned Konz Date: Tue, 15 Nov 2016 07:16:47 -0800 Subject: [PATCH] Added quoting to osascript command lines If your .vim directory happens to be symlinked to a directory that has spaces in its name, the system() commands that execute osascript will fail. This PR adds quoting to those commands. --- plugin/vim-markdown-preview.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/vim-markdown-preview.vim b/plugin/vim-markdown-preview.vim index 7794a86..bda852f 100644 --- a/plugin/vim-markdown-preview.vim +++ b/plugin/vim-markdown-preview.vim @@ -77,11 +77,11 @@ function! Vim_Markdown_Preview() if g:vmp_osname == 'mac' if g:vim_markdown_preview_browser == "Google Chrome" - let b:vmp_preview_in_browser = system('osascript ' . g:vmp_search_script) + let b:vmp_preview_in_browser = system('osascript "' . g:vmp_search_script . '"') if b:vmp_preview_in_browser == 1 call system('open -g /tmp/vim-markdown-preview.html') else - call system('osascript ' . g:vmp_activate_script) + call system('osascript "' . g:vmp_activate_script . '"') endif else call system('open -g /tmp/vim-markdown-preview.html') -- 2.45.2