Help: Add check for pushing current page to history

This commit is contained in:
roepfeli 2021-07-20 00:48:26 +02:00 committed by Gunnar Beutner
parent fd5bc36fc1
commit f44f7927a8
Notes: sideshowbarker 2024-07-18 08:43:54 +09:00

View File

@ -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++;