1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

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

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