diff options
author | mae <qt-info@nokia.com> | 2010-04-13 12:06:26 +0200 |
---|---|---|
committer | mae <qt-info@nokia.com> | 2010-04-13 12:07:43 +0200 |
commit | d633ec2094c78e2b0782290c62add03f68bbd105 (patch) | |
tree | c8db7bb308f6db5b21e850d255173fdd5e6a2c96 /src/plugins/find/basetextfind.h | |
parent | 512b312cc185b215cfd53f5f6de4e41d5724e1b3 (diff) | |
download | qt-creator-d633ec2094c78e2b0782290c62add03f68bbd105.tar.gz |
Fix find scope expanding
We now use two cursors, with the first one being positioned at the
character before the find scope starts. This makes it possible
to extend the scope when typing at the beginning or the end of
it. This is more what the user expects. The effect is noticable
with find&replace of words at the beginning or end of the scope.
Diffstat (limited to 'src/plugins/find/basetextfind.h')
-rw-r--r-- | src/plugins/find/basetextfind.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/find/basetextfind.h b/src/plugins/find/basetextfind.h index 0c5c777b8e..c62f5a7282 100644 --- a/src/plugins/find/basetextfind.h +++ b/src/plugins/find/basetextfind.h @@ -70,7 +70,7 @@ public: signals: void highlightAll(const QString &txt, Find::IFindSupport::FindFlags findFlags); - void findScopeChanged(const QTextCursor &, int = 0); + void findScopeChanged(const QTextCursor &start, const QTextCursor &end, int verticalBlockSelection); private: bool find(const QString &txt, @@ -83,10 +83,9 @@ private: bool isReadOnly() const; QPointer<QTextEdit> m_editor; QPointer<QPlainTextEdit> m_plaineditor; - QTextCursor m_findScope; + QTextCursor m_findScopeStart; + QTextCursor m_findScopeEnd; int m_findScopeVerticalBlockSelection; - int m_findScopeFromColumn; - int m_findScopeToColumn; bool inScope(int startPosition, int endPosition) const; QTextCursor findOne(const QRegExp &expr, const QTextCursor &from, QTextDocument::FindFlags options) const; int m_incrementalStartPos; |