From 9a13f143a881d10b7aa86682d74ea82898f7e35e Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 9 May 2015 19:14:54 +0200 Subject: [PATCH] rename: fix saving/restoring of the view This seemed(?) to work with Python 3, but not for Python 2. Just get a string (instead of dict) from Vim, and re-use that as-is. This fixes afb84a8. --- jedi_vim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jedi_vim.py b/jedi_vim.py index 5c08980..a484b6b 100644 --- a/jedi_vim.py +++ b/jedi_vim.py @@ -484,14 +484,14 @@ def do_rename(replace, orig = None): buffers.add(vim.current.buffer.name) # Save view. - saved_view = vim_eval('winsaveview()') + saved_view = vim_eval('string(winsaveview())') # Replace original word. vim.current.window.cursor = r.start_pos vim_command('normal! c{:d}l{}'.format(len(orig), replace)) # Restore view. - vim_command('call winrestview(%s)' % PythonToVimStr(saved_view)) + vim_command('call winrestview(%s)' % saved_view) # Restore previous tab and window. vim_command('tabnext {:d}'.format(saved_tab))