From 74d93b8c3def83d8dae412af9110c5f128d99e18 Mon Sep 17 00:00:00 2001 From: David Halter Date: Fri, 4 Jan 2013 15:11:41 +0100 Subject: [PATCH] related_name changed sorting -> change renaming --- jedi | 2 +- plugin/jedi_vim.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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