diff --git a/src/plugins/find/basetextfind.cpp b/src/plugins/find/basetextfind.cpp index d939c5b69a132a047bff05b789753bf5adc6758a..42059de72bc1cf5a69c2cd7a008077fbb0a7664a 100644 --- a/src/plugins/find/basetextfind.cpp +++ b/src/plugins/find/basetextfind.cpp @@ -329,7 +329,7 @@ void BaseTextFind::defineFindScope() { QTextCursor cursor = textCursor(); if (cursor.hasSelection() && cursor.block() != cursor.document()->findBlock(cursor.anchor())) { - d->m_findScopeStart = QTextCursor(document()->docHandle(), qMax(0, cursor.selectionStart()-1)); + d->m_findScopeStart = QTextCursor(document()->docHandle(), qMax(0, cursor.selectionStart())); d->m_findScopeEnd = QTextCursor(document()->docHandle(), cursor.selectionEnd()); d->m_findScopeVerticalBlockSelectionFirstColumn = -1; d->m_findScopeVerticalBlockSelectionLastColumn = -1; @@ -344,7 +344,7 @@ void BaseTextFind::defineFindScope() emit findScopeChanged(d->m_findScopeStart, d->m_findScopeEnd, d->m_findScopeVerticalBlockSelectionFirstColumn, d->m_findScopeVerticalBlockSelectionLastColumn); - cursor.setPosition(d->m_findScopeStart.position()+1); + cursor.setPosition(d->m_findScopeStart.position()); setTextCursor(cursor); } else { clearFindScope(); diff --git a/src/plugins/texteditor/texteditoroverlay.cpp b/src/plugins/texteditor/texteditoroverlay.cpp index 4fbe7d2781894f818be44e470938d9e0047e91ef..7ee11757cdf86d3a8e23a5eb2a5c8632a9848b92 100644 --- a/src/plugins/texteditor/texteditoroverlay.cpp +++ b/src/plugins/texteditor/texteditoroverlay.cpp @@ -171,10 +171,10 @@ QPainterPath TextEditorOverlay::createSelectionPath(const QTextCursor &begin, co inSelection = true; firstOrLastBlock = true; } else { - while (beginChar < block.length() && document->characterAt(block.position() + beginChar).isSpace()) - ++beginChar; - if (beginChar == block.length()) - beginChar = 0; +// while (beginChar < block.length() && document->characterAt(block.position() + beginChar).isSpace()) +// ++beginChar; +// if (beginChar == block.length()) +// beginChar = 0; } int lastLine = blockLayout->lineCount()-1;