diff --git a/CHANGELOG.md b/CHANGELOG.md index 0473261..82d19e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Only one request is made for each URL - `v1.3.0` accidentally made two requests each time (#50) - Using the `..` command doesn't keep the query string (#49) - Any error that occurs when downloading a file will be displayed, and the partially downloaded file will be deleted +- Allow for opening a new tab while the current one is loading ## [1.3.0] - 2020-07-10 diff --git a/NOTES.md b/NOTES.md index f769c08..a30c9d3 100644 --- a/NOTES.md +++ b/NOTES.md @@ -3,7 +3,8 @@ ## Issues - URL for each tab should not be stored as a string - in the current code there's lots of reparsing the URL - Can't go back or do other things while page is loading - need a way to stop `handleURL` -- Allow for opening a new tab while the current one is loading + +## Regressions - Can't leave the help window - Can't interact with page after clicking Cancel on bkmk (and other?) modal(s) diff --git a/display/display.go b/display/display.go index b6ea6e6..7ef2e8b 100644 --- a/display/display.go +++ b/display/display.go @@ -253,19 +253,6 @@ func Init() { } switch event.Key() { - case tcell.KeyCtrlT: - if tabs[curTab].page.Mode == structs.ModeLinkSelect { - next, err := resolveRelLink(tabs[curTab], tabs[curTab].page.Url, tabs[curTab].page.Selected) - if err != nil { - Error("URL Error", err.Error()) - return nil - } - NewTab() - URL(next) - } else { - NewTab() - } - return nil case tcell.KeyCtrlR: Reload() return nil @@ -341,6 +328,19 @@ func Init() { // All the keys and operations that can work while a tab IS loading switch event.Key() { + case tcell.KeyCtrlT: + if tabs[curTab].page.Mode == structs.ModeLinkSelect { + next, err := resolveRelLink(tabs[curTab], tabs[curTab].page.Url, tabs[curTab].page.Selected) + if err != nil { + Error("URL Error", err.Error()) + return nil + } + NewTab() + URL(next) + } else { + NewTab() + } + return nil case tcell.KeyCtrlW: CloseTab() return nil