diff options
author | Joel Smith <joel.m.smith@gmail.com> | 2019-05-15 21:50:28 -0700 |
---|---|---|
committer | Joel Smith <joel.m.smith@gmail.com> | 2019-05-27 14:09:12 +0000 |
commit | e846b8717aad09e71650c6ca95b05d320f1eb3f1 (patch) | |
tree | 818bc7e5fb6cfa9ff754b75eb7057d7e36e8b00d /src/plugins/texteditor/texteditor.cpp | |
parent | 0980484be856a71d704bad7623d0b6c5abff143e (diff) | |
download | qt-creator-e846b8717aad09e71650c6ca95b05d320f1eb3f1.tar.gz |
TextEditor: Type over punctuation that can be auto completed
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 <riitta-leena.miettinen@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditor.cpp')
-rw-r--r-- | src/plugins/texteditor/texteditor.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 97970dbd6e..197eb5ddcf 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -7521,6 +7521,7 @@ void TextEditorWidget::setCompletionSettings(const CompletionSettings &completio d->m_autoCompleter->setSurroundWithBracketsEnabled(completionSettings.m_surroundingAutoBrackets); d->m_autoCompleter->setAutoInsertQuotesEnabled(completionSettings.m_autoInsertQuotes); d->m_autoCompleter->setSurroundWithQuotesEnabled(completionSettings.m_surroundingAutoQuotes); + d->m_autoCompleter->setOverwriteClosingCharsEnabled(completionSettings.m_overwriteClosingChars); d->m_animateAutoComplete = completionSettings.m_animateAutoComplete; d->m_highlightAutoComplete = completionSettings.m_highlightAutoComplete; d->m_skipAutoCompletedText = completionSettings.m_skipAutoCompletedText; |