From f44f7927a80ace5adc75e23dc628349a6d69f119 Mon Sep 17 00:00:00 2001 From: roepfeli <85442544+roepfeli@users.noreply.github.com> Date: Tue, 20 Jul 2021 00:48:26 +0200 Subject: [PATCH] Help: Add check for pushing current page to history --- Userland/Applications/Help/History.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Applications/Help/History.cpp b/Userland/Applications/Help/History.cpp index 6cd73ea863a..d3354255d28 100644 --- a/Userland/Applications/Help/History.cpp +++ b/Userland/Applications/Help/History.cpp @@ -8,6 +8,9 @@ void History::push(const StringView& history_item) { + if (!m_items.is_empty() && m_items[m_current_history_item] == history_item) + return; + m_items.shrink(m_current_history_item + 1); m_items.append(history_item); m_current_history_item++;