mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00: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: f44f7927a8
Pull-request: https://github.com/SerenityOS/serenity/pull/8898
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