diff -r 61f698ad9ec5 -r 2d77b3afc98f RefactoringRope/Refactoring.py --- a/RefactoringRope/Refactoring.py Mon Mar 02 19:52:15 2015 +0100 +++ b/RefactoringRope/Refactoring.py Sat Mar 07 15:57:24 2015 +0100 @@ -938,7 +938,8 @@ @param index index into line for the offset (integer) @return rope compliant offset into the file (integer) """ - offset = editor.positionFromLineIndex(line, index) + source = self.__editor.text() + offset = len("".join(source.splitlines(True)[:line])) + index if editor.eolMode() == QsciScintilla.EolWindows: offset -= line return offset