diff --git a/CHANGELOG.md b/CHANGELOG.md index 04dcf35..80a54b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Time out when header takes too long - Preformatted text is now light yellow by default - Downloading a file no longer uses a second request +- You can go back to the new tab page in history (#96) ### Fixed - Single quotes are used in the default config for commands and paths so that Windows paths with backslashes will be parsed correctly diff --git a/display/display.go b/display/display.go index 2110745..e35d79f 100644 --- a/display/display.go +++ b/display/display.go @@ -439,10 +439,8 @@ func NewTab() { tabs = append(tabs, makeNewTab()) temp := newTabPage // Copy setPage(tabs[curTab], &temp) - - // Can't go backwards, but this isn't the first page either. - // The first page will be the next one the user goes to. - tabs[curTab].history.pos = -1 + tabs[curTab].addToHistory("about:newtab") + tabs[curTab].history.pos = 0 // Manually set as first page tabPages.AddAndSwitchToPage(strconv.Itoa(curTab), tabs[curTab].view, true) App.SetFocus(tabs[curTab].view)