diff --git a/src/view/kateview.cpp b/src/view/kateview.cpp --- a/src/view/kateview.cpp +++ b/src/view/kateview.cpp @@ -2545,7 +2545,7 @@ QPoint KTextEditor::ViewPrivate::cursorPositionCoordinates() const { // map from ViewInternal to View coordinates - const QPoint pt = m_viewInternal->cursorCoordinates(); + const QPoint pt = m_viewInternal->cursorCoordinates(false); return pt == QPoint(-1, -1) ? pt : m_viewInternal->mapToParent(pt); } diff --git a/src/view/kateviewinternal.cpp b/src/view/kateviewinternal.cpp --- a/src/view/kateviewinternal.cpp +++ b/src/view/kateviewinternal.cpp @@ -661,7 +661,7 @@ // Check to see that we're not showing blank lines KTextEditor::Cursor max = maxStartPos(); if (startPos() > max) { - scrollPos(max, max.column(), calledExternally); + scrollPos(max, false, calledExternally); } } @@ -2789,7 +2789,7 @@ ret = renderer()->xToCursor(thisLine, coord.x(), !m_view->wrapCursor()); } - if (ret.column() == view()->document()->lineLength(ret.line())) { + if (ret.column() > view()->document()->lineLength(ret.line())) { // The cursor is beyond the end of the line; in that case the renderer // gives the index of the character behind the last one. return KTextEditor::Cursor::invalid();