diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 76a217f67b6..1d6a55861c7 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -5015,6 +5015,8 @@ void BaseTextEditorWidget::_q_matchParentheses() QTextCursor backwardMatch = textCursor(); QTextCursor forwardMatch = textCursor(); + if (overwriteMode()) + backwardMatch.movePosition(QTextCursor::Right); const TextBlockUserData::MatchType backwardMatchType = TextBlockUserData::matchCursorBackward(&backwardMatch); const TextBlockUserData::MatchType forwardMatchType = TextBlockUserData::matchCursorForward(&forwardMatch);