mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
Help: Add check for pushing current page to history
This commit is contained in:
parent
fd5bc36fc1
commit
f44f7927a8
1 changed files with 3 additions and 0 deletions
|
@ -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++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue