From 84f5cd92c72ab267cc42865aa5488bf498770f22 Mon Sep 17 00:00:00 2001 From: Bagrat Aznauryan Date: Mon, 2 Nov 2015 01:26:52 +0400 Subject: [PATCH] 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. --- AUTHORS.txt | 1 + jedi_vim.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index 72849fb..517fcb5 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -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. diff --git a/jedi_vim.py b/jedi_vim.py index f9db8de..f5fddd3 100644 --- a/jedi_vim.py +++ b/jedi_vim.py @@ -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: