diff --git a/TermTk/TTkWidgets/texedit.py b/TermTk/TTkWidgets/texedit.py index 623c266f..e89f5832 100644 --- a/TermTk/TTkWidgets/texedit.py +++ b/TermTk/TTkWidgets/texedit.py @@ -241,7 +241,7 @@ class _TTkTextEditView(TTkAbstractScrollView): I assume the x,y position already normalized using the _cursorAlign function ''' dt, (fr, to) = self._lines[y] - return self._dataLines[dt], self._dataLines[dt].tabCharPos(x+fr,self._tabSpaces) + return self._dataLines[dt], fr+self._dataLines[dt].substring(fr,to).tabCharPos(x,self._tabSpaces) def _cursorFromLinePos(self,liney,p): ''' @@ -258,8 +258,8 @@ class _TTkTextEditView(TTkAbstractScrollView): if dt1 != dt: break if fr<=p