🐛 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 ## Issues
- URL for each tab should not be stored as a string - in the current code there's lots of reparsing the URL - 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` - 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 ## Regressions
- Can't leave the help window
- Can't interact with page after clicking Cancel on bkmk (and other?) modal(s) - Can't interact with page after clicking Cancel on bkmk (and other?) modal(s)
## Upstream Bugs ## Upstream Bugs

View File

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