escape file paths if opening new buffers/tabs, fixes #54

This commit is contained in:
David Halter
2012-12-21 13:03:39 +01:00
parent 6a70c84cc0
commit ff10a0a6e4
3 changed files with 7 additions and 3 deletions

View File

@@ -110,12 +110,12 @@ endfunction
" ------------------------------------------------------------------------
function! jedi#new_buffer(path)
if g:jedi#use_tabs_not_buffers
python jedi_vim.tabnew(vim.eval('a:path'))
python jedi_vim.tabnew(jedi_vim.escape_file_path(vim.eval('a:path')))
else
if !&hidden && &modified
w
endif
execute 'edit '.a:path
python vim.execute('edit ' + vim.eval(jedi_vim.escape_file_path(vim.eval('a:path'))))
endif
endfunction