mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-09 03:54:52 +08:00
escape file paths if opening new buffers/tabs, fixes #54
This commit is contained in:
@@ -110,12 +110,12 @@ endfunction
|
|||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
function! jedi#new_buffer(path)
|
function! jedi#new_buffer(path)
|
||||||
if g:jedi#use_tabs_not_buffers
|
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
|
else
|
||||||
if !&hidden && &modified
|
if !&hidden && &modified
|
||||||
w
|
w
|
||||||
endif
|
endif
|
||||||
execute 'edit '.a:path
|
python vim.execute('edit ' + vim.eval(jedi_vim.escape_file_path(vim.eval('a:path'))))
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
2
jedi
2
jedi
Submodule jedi updated: ce0aadc9a5...b3c89effe7
@@ -299,5 +299,9 @@ def tabnew(path):
|
|||||||
vim.command('tabnew %s' % path)
|
vim.command('tabnew %s' % path)
|
||||||
|
|
||||||
|
|
||||||
|
def escape_file_path(path):
|
||||||
|
return path.replace(' ', r'\ ')
|
||||||
|
|
||||||
|
|
||||||
def print_to_stdout(level, str_out):
|
def print_to_stdout(level, str_out):
|
||||||
print(str_out)
|
print(str_out)
|
||||||
|
|||||||
Reference in New Issue
Block a user