mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 11:39:44 +03:00
Help: Add check for pushing current page to history
This commit is contained in:
parent
fd5bc36fc1
commit
f44f7927a8
Notes:
sideshowbarker
2024-07-18 08:43:54 +09:00
Author: https://github.com/roepfeli 🔰 Commit: https://github.com/SerenityOS/serenity/commit/f44f7927a80 Pull-request: https://github.com/SerenityOS/serenity/pull/8898
@ -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…
Reference in New Issue
Block a user