1
0
mirror of https://github.com/makew0rld/amfora.git synced 2024-06-19 19:25:24 +00:00

Ability to go back to new tab page

This commit is contained in:
makeworld 2020-12-19 20:19:47 -05:00
parent ae9bfa5e2b
commit 95f077c083
2 changed files with 3 additions and 4 deletions

View File

@ -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 - Time out when header takes too long
- Preformatted text is now light yellow by default - Preformatted text is now light yellow by default
- Downloading a file no longer uses a second request - Downloading a file no longer uses a second request
- You can go back to the new tab page in history (#96)
### Fixed ### Fixed
- Single quotes are used in the default config for commands and paths so that Windows paths with backslashes will be parsed correctly - Single quotes are used in the default config for commands and paths so that Windows paths with backslashes will be parsed correctly

View File

@ -439,10 +439,8 @@ func NewTab() {
tabs = append(tabs, makeNewTab()) tabs = append(tabs, makeNewTab())
temp := newTabPage // Copy temp := newTabPage // Copy
setPage(tabs[curTab], &temp) setPage(tabs[curTab], &temp)
tabs[curTab].addToHistory("about:newtab")
// Can't go backwards, but this isn't the first page either. tabs[curTab].history.pos = 0 // Manually set as first page
// The first page will be the next one the user goes to.
tabs[curTab].history.pos = -1
tabPages.AddAndSwitchToPage(strconv.Itoa(curTab), tabs[curTab].view, true) tabPages.AddAndSwitchToPage(strconv.Itoa(curTab), tabs[curTab].view, true)
App.SetFocus(tabs[curTab].view) App.SetFocus(tabs[curTab].view)