From a55bbfa2310b062bd2807f0a0772d0fa74627cce Mon Sep 17 00:00:00 2001 From: Eric Siebeneich Date: Fri, 2 Jan 2015 14:16:37 -0600 Subject: [PATCH] Changed relative file to absolute file Using relative files causes a failure if you open a file within vim that is not in your current working directory. This can lead to unexpected results if there is an file name identical to the one you are editing in the working directory, and no markdown generated if there is no file with that name in the working directory. --- plugin/vim-markdown-preview.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/vim-markdown-preview.vim b/plugin/vim-markdown-preview.vim index c907e54..541110b 100644 --- a/plugin/vim-markdown-preview.vim +++ b/plugin/vim-markdown-preview.vim @@ -4,7 +4,7 @@ "============================================================ function! Vim_Markdown_Preview() - let curr_file = expand('%:t') + let curr_file = expand('%:p') call system('markdown ' . curr_file . ' > /tmp/vim-markdown-preview.html') let chrome_wid = system("xdotool search --name 'vim-markdown-preview.html - Google Chrome'") if !chrome_wid -- 2.45.2