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

🐛 Able to leave help page

This was a regression, the bug was not present in v1.3.0. This could be due to the cview update?
This commit is contained in:
makeworld 2020-07-28 17:33:18 -04:00
parent 420b8a83a2
commit 27537c7edb
2 changed files with 4 additions and 1 deletions

View File

@ -3,9 +3,9 @@
## 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`
- Pressing Escape in the bottom bar jumps back to the top of the page
## Regressions
- Can't leave the help window
- Can't interact with page after clicking Cancel on bkmk (and other?) modal(s)
## Upstream Bugs

View File

@ -51,6 +51,7 @@ var helpTable = cview.NewTable().
func Help() {
helpTable.ScrollToBeginning()
tabPages.SwitchToPage("help")
App.SetFocus(helpTable)
App.Draw()
}
@ -59,6 +60,8 @@ func helpInit() {
helpTable.SetDoneFunc(func(key tcell.Key) {
if key == tcell.KeyEsc {
tabPages.SwitchToPage(strconv.Itoa(curTab))
App.SetFocus(tabs[curTab].view)
App.Draw()
}
})
rows := strings.Count(helpCells, "\n") + 1