From 675060724453fc2a5d12431b656fdbb599e529f6 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 10 Jun 2016 15:13:38 +0200 Subject: 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 Reviewed-by: Eike Ziller Reviewed-by: Nikolai Kosjar Reviewed-by: David Schulz --- src/libs/cplusplus/MatchingText.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libs/cplusplus/MatchingText.h') 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); }; -- cgit v1.2.1