--- a/RefactoringRope/Refactoring.py Tue Apr 07 21:41:40 2015 +0200 +++ b/RefactoringRope/Refactoring.py Tue Apr 07 21:44:49 2015 +0200 @@ -1005,6 +1005,7 @@ filename = aw.getFileName() if renameModule: offset = None + selectedText, _ = os.path.splitext(os.path.basename(filename)) else: line, index, line1, index1 = aw.getSelection() if line != line1: @@ -1017,6 +1018,7 @@ index = int(index + (index1 - index) / 2) # keep it inside the object offset = self.__getOffset(aw, line, index) + selectedText = aw.selectedText() import rope.refactor.rename resource = rope.base.libutils.path_to_resource( @@ -1034,7 +1036,7 @@ localResource = None from RenameDialog import RenameDialog self.dlg = RenameDialog(self, title, renamer, resource=localResource, - parent=self.__ui) + selectedText=selectedText, parent=self.__ui) self.dlg.show() def __changeOccurrences(self):