mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 19:24:36 +08:00
Rename was in the wrong spot when using it at the end of a line.
This commit is contained in:
@@ -608,7 +608,13 @@ def rename():
|
|||||||
vim_command('augroup END')
|
vim_command('augroup END')
|
||||||
|
|
||||||
vim_command("let s:jedi_replace_orig = expand('<cword>')")
|
vim_command("let s:jedi_replace_orig = expand('<cword>')")
|
||||||
|
line = vim_eval('getline(".")')
|
||||||
vim_command('normal! diw')
|
vim_command('normal! diw')
|
||||||
|
if re.match('\w+$', line[cursor[1]:]):
|
||||||
|
# In case the deleted word is at the end of the line we need to
|
||||||
|
# move the cursor to the end.
|
||||||
|
vim_command('startinsert!')
|
||||||
|
else:
|
||||||
vim_command('startinsert')
|
vim_command('startinsert')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user