From 9f1c6e9c72a373da1c57f9dc493a3e00ab69f54f Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 13 May 2024 16:25:38 +0200 Subject: [PATCH] TextEditors: Do not add to history twice for Ctrl+Click navigation When Ctrl+Clicking to follow symbols, the original location was added twice to the history, once in the click handler, and once when the link was opened in `TextEditorWidget::openLink` Change-Id: I806165621d7ea229aa963b5b7d83c5327d8e7f14 Reviewed-by: David Schulz --- src/plugins/texteditor/texteditor.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 92636e63cd2..6cb9b00b490 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -6861,7 +6861,6 @@ void TextEditorWidget::mouseReleaseEvent(QMouseEvent *e) { const Qt::MouseButton button = e->button(); if (d->m_linkPressed && d->isMouseNavigationEvent(e) && button == Qt::LeftButton) { - EditorManager::addCurrentPositionToNavigationHistory(); bool inNextSplit = ((e->modifiers() & Qt::AltModifier) && !alwaysOpenLinksInNextSplit()) || (alwaysOpenLinksInNextSplit() && !(e->modifiers() & Qt::AltModifier));