diff --git a/jedi b/jedi index 23f36c8..89bd32e 160000 --- a/jedi +++ b/jedi @@ -1 +1 @@ -Subproject commit 23f36c86d7d7c5b890fef9eb9eb46cd1fe553329 +Subproject commit 89bd32e0d7397955afa271371f182a2c4aedbe74 diff --git a/plugin/jedi_vim.py b/plugin/jedi_vim.py index 9b0bcd9..5513098 100644 --- a/plugin/jedi_vim.py +++ b/plugin/jedi_vim.py @@ -262,6 +262,10 @@ def rename(): if replace is None: echo_highlight('No rename possible, if no name is given.') else: + # sort the whole thing reverse (positions at the end of the line + # must be first, because they move the stuff before the position). + temp_rename = sorted(temp_rename, reverse=True, + key=lambda x: (x.module_path, x.start_pos)) for r in temp_rename: if r.in_builtin_module(): continue