summaryrefslogtreecommitdiff
path: root/src/plugins/find
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-09-28 16:50:02 +0200
committermae <qt-info@nokia.com>2010-09-28 16:50:40 +0200
commit5c6cfdf848364bd5f3c2fa46438a890ae13e3673 (patch)
tree99c3a3728e5e102b6f8873f5989ce14e5fe8f7db /src/plugins/find
parent1bed93e0ea857757411b82dffb71143272036743 (diff)
downloadqt-creator-5c6cfdf848364bd5f3c2fa46438a890ae13e3673.tar.gz
Fixed find scope
There was an off-by-one error for the normal find scope. Improved look by ignoring the left side.
Diffstat (limited to 'src/plugins/find')
-rw-r--r--src/plugins/find/basetextfind.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/find/basetextfind.cpp b/src/plugins/find/basetextfind.cpp
index d939c5b69a..42059de72b 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();