From e846b8717aad09e71650c6ca95b05d320f1eb3f1 Mon Sep 17 00:00:00 2001 From: Joel Smith Date: Wed, 15 May 2019 21:50:28 -0700 Subject: TextEditor: Type over punctuation that can be auto completed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This restores a feature of older Qt Creator versions: typing "over" closing punctuation. For instance, if my cursor is at | and I have something like this: if (statement|) ... and I type the ) character, older versions of Qt Creator would not end up with )). With newer versions of Qt Creator, this behavior is limited to the case where an autocompletion has just happened (i.e. if I typed the opening ( character, the closing ) is auto inserted and highlighted - and if I type it myself, it won't add a second one). Task-number: QTCREATORBUG-16946 Change-Id: I45af3ac139d5e7c76e5f0a8a9d66762f9209a525 Reviewed-by: Leena Miettinen Reviewed-by: André Hartmann Reviewed-by: David Schulz --- src/plugins/texteditor/autocompleter.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/texteditor/autocompleter.h') diff --git a/src/plugins/texteditor/autocompleter.h b/src/plugins/texteditor/autocompleter.h index 4847f504762..128d875e0f9 100644 --- a/src/plugins/texteditor/autocompleter.h +++ b/src/plugins/texteditor/autocompleter.h @@ -53,6 +53,9 @@ public: void setSurroundWithQuotesEnabled(bool b) { m_surroundWithQuotes = b; } bool isSurroundWithQuotesEnabled() const { return m_surroundWithQuotes; } + void setOverwriteClosingCharsEnabled(bool b) { m_overwriteClosingChars = b; } + bool isOverwriteClosingCharsEnabled() const { return m_overwriteClosingChars; } + void setTabSettings(const TabSettings &tabSettings) { m_tabSettings = tabSettings; } const TabSettings &tabSettings() const { return m_tabSettings; } @@ -103,6 +106,7 @@ private: bool m_surroundWithBrackets; bool m_autoInsertQuotes; bool m_surroundWithQuotes; + bool m_overwriteClosingChars; }; } // TextEditor -- cgit v1.2.3