Use escape_file_path in new_buffer

Fix: If a definition file path contains a space, the "open in split"
     fails with an error.

Fixes https://github.com/davidhalter/jedi-vim/issues/491.
Closes https://github.com/davidhalter/jedi-vim/issues/492.
This commit is contained in:
Bagrat Aznauryan
2015-11-02 01:26:52 +04:00
committed by Daniel Hahler
parent 9af06424fb
commit 84f5cd92c7
2 changed files with 2 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ Matthew Tylee Atkinson (@matatk)
Pedro Ferrari (@petobens)
Daniel Hahler (@blueyed)
Dave Honneffer (@pearofducks)
Bagrat Aznauryan (@n9code)
@something are github user names.

View File

@@ -640,7 +640,7 @@ def new_buffer(path, options='', using_tagstack=False):
if user_split_option not in split_options:
print('g:jedi#use_splits_not_buffers value is not correct, valid options are: %s' % ','.join(split_options.keys()))
else:
vim_command(split_options[user_split_option] + " %s" % path)
vim_command(split_options[user_split_option] + " %s" % escape_file_path(path))
else:
if vim_eval("!&hidden && &modified") == '1':
if vim_eval("bufname('%')") is None: