diff options
author | David Schulz <david.schulz@qt.io> | 2016-06-10 15:13:38 +0200 |
---|---|---|
committer | David Schulz <david.schulz@theqtcompany.com> | 2016-06-21 11:56:56 +0000 |
commit | 675060724453fc2a5d12431b656fdbb599e529f6 (patch) | |
tree | cbf5a1fc06919089d4028bd31c6ae7e15ee575b6 /src/libs/cplusplus/MatchingText.h | |
parent | 08dcad9c829abfbc592d6a4628d091d942a87c0f (diff) | |
download | qt-creator-675060724453fc2a5d12431b656fdbb599e529f6.tar.gz |
Editor: Skip auto completed character only if it was recently inserted.
This means you can skip automatically inserted characters as long as you
don't explicitly move the text cursor and the editor doesn't lose the
focus. This will be visualized by highlighting the automatically
inserted character as long as you can perform the skipping.
This will reduce unexpected skipping in the case a cursor was explicitly
placed before an closing brace and a closing brace is typed.
Change-Id: I28e29e79ba10c9c48e8bc8817405fea630cca9bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Diffstat (limited to 'src/libs/cplusplus/MatchingText.h')
-rw-r--r-- | src/libs/cplusplus/MatchingText.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/cplusplus/MatchingText.h b/src/libs/cplusplus/MatchingText.h index c93488c8ec..0f861d152d 100644 --- a/src/libs/cplusplus/MatchingText.h +++ b/src/libs/cplusplus/MatchingText.h @@ -49,9 +49,9 @@ public: static bool isInStringHelper(const QTextCursor &cursor); static QString insertMatchingBrace(const QTextCursor &tc, const QString &text, - QChar lookAhead, int *skippedChars); + QChar lookAhead, bool skipChars, int *skippedChars); static QString insertMatchingQuote(const QTextCursor &tc, const QString &text, - QChar lookAhead, int *skippedChars); + QChar lookAhead, bool skipChars, int *skippedChars); static QString insertParagraphSeparator(const QTextCursor &tc); }; |