mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-08 03:24:47 +08:00
expand a:path when opening a new file with :edit
This commit is contained in:
14
jedi.vim
14
jedi.vim
@@ -98,11 +98,7 @@ endfunction
|
|||||||
function! jedi#rename(...)
|
function! jedi#rename(...)
|
||||||
python << PYTHONEOF
|
python << PYTHONEOF
|
||||||
if 1:
|
if 1:
|
||||||
try:
|
if not int(vim.eval('a:0')):
|
||||||
start_renaming = int(vim.eval('a:0'))
|
|
||||||
except vim.error:
|
|
||||||
start_renaming = 0
|
|
||||||
if start_renaming == 0:
|
|
||||||
temp_rename = _goto(is_related_name=True, no_output=True)
|
temp_rename = _goto(is_related_name=True, no_output=True)
|
||||||
_rename_cursor = vim.current.window.cursor
|
_rename_cursor = vim.current.window.cursor
|
||||||
|
|
||||||
@@ -214,12 +210,10 @@ function! jedi#new_buffer(path)
|
|||||||
if g:jedi#use_tabs_not_buffers
|
if g:jedi#use_tabs_not_buffers
|
||||||
return jedi#tabnew(a:path)
|
return jedi#tabnew(a:path)
|
||||||
else
|
else
|
||||||
if &hidden == 0
|
if !&hidden && &modified
|
||||||
if &modified
|
w
|
||||||
w
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
edit! a:path
|
execute 'edit '.a:path
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user