From 27537c7edba46267496317c05aede0874d5b625e Mon Sep 17 00:00:00 2001 From: makeworld Date: Tue, 28 Jul 2020 17:33:18 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Able=20to=20leave=20help=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was a regression, the bug was not present in v1.3.0. This could be due to the cview update? --- NOTES.md | 2 +- display/help.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NOTES.md b/NOTES.md index a30c9d3..a0247ea 100644 --- a/NOTES.md +++ b/NOTES.md @@ -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 diff --git a/display/help.go b/display/help.go index 0fb1c71..22d02b8 100644 --- a/display/help.go +++ b/display/help.go @@ -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