RefactoringRope/Refactoring.py

changeset 103
2d77b3afc98f
parent 94
03d6a17c66ac
child 106
b2b2107b8047
--- 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

eric ide

mercurial