diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-11-26 19:03:45 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-11-26 20:54:55 +0100 |
commit | f3763a527592fae56401e8f8461d644ddc172d05 (patch) | |
tree | 00bb2aa5d86580cd72e74cebbddbaf497e2da33a /Userland/Applications | |
parent | 8e165887578b1924c924c5a76efcfcf7dca08498 (diff) | |
download | serenity-f3763a527592fae56401e8f8461d644ddc172d05.zip |
Browser: Remove previous history entry in History::replace_current()
The lack of this action caused a bug in my original patch
(https://github.com/SerenityOS/serenity/pull/16004) that appeared when
accessing a site that redirected the client and it was the first site
the client loaded.
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/Browser/History.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Applications/Browser/History.cpp b/Userland/Applications/Browser/History.cpp index 964944a364..f93d07fcc6 100644 --- a/Userland/Applications/Browser/History.cpp +++ b/Userland/Applications/Browser/History.cpp @@ -35,6 +35,7 @@ void History::replace_current(const URL& url, String const& title) if (m_current == -1) return; + m_items.remove(m_current); m_current--; push(url, title); } |