diff options
author | roepfeli <85442544+roepfeli@users.noreply.github.com> | 2021-07-20 00:48:26 +0200 |
---|---|---|
committer | Gunnar Beutner <gunnar@beutner.name> | 2021-07-20 01:54:36 +0200 |
commit | f44f7927a80ace5adc75e23dc628349a6d69f119 (patch) | |
tree | 950258985ee2032b83ef6ad5011b9a5135f3b93d | |
parent | fd5bc36fc15921be43b7b79cddfa495fa2581724 (diff) | |
download | serenity-f44f7927a80ace5adc75e23dc628349a6d69f119.zip |
Help: Add check for pushing current page to history
-rw-r--r-- | Userland/Applications/Help/History.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applications/Help/History.cpp b/Userland/Applications/Help/History.cpp index 6cd73ea863..d3354255d2 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++; |