diff --git a/CHANGELOG.md b/CHANGELOG.md index 7703e51..de531d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ability to set custom keybindings in config (#135) ### Changed -- Update cview to `1af0da7606b8476944b5740bb4f0b711aaf2a1df` for large perf and feature updates (#107) +- Update cview to `1af0da7606b8476944b5740bb4f0b711aaf2a1df` for large performance and feature updates (#107) - Update to tcell v2 (dependency of cview) ### Fixed diff --git a/amfora.go b/amfora.go index 179e0bd..8c4f903 100644 --- a/amfora.go +++ b/amfora.go @@ -52,7 +52,7 @@ func main() { client.Init() - // Initalize lower-level cview app + // Initialize lower-level cview app if err = display.App.Init(); err != nil { panic(err) } diff --git a/display/help.go b/display/help.go index 0e45e5e..09879ae 100644 --- a/display/help.go +++ b/display/help.go @@ -2,7 +2,6 @@ package display import ( "fmt" - "strconv" "strings" "text/tabwriter" @@ -55,12 +54,9 @@ var helpTable = cview.NewTextView() // Help displays the help and keybindings. func Help() { helpTable.ScrollToBeginning() - if !browser.HasTab("help") { - browser.AddTab("help", "Help", helpTable) - } - browser.SetCurrentTab("help") + panels.ShowPanel("help") + panels.SendToFront("help") App.SetFocus(helpTable) - App.Draw() } func helpInit() { @@ -69,7 +65,7 @@ func helpInit() { helpTable.SetPadding(0, 0, 1, 1) helpTable.SetDoneFunc(func(key tcell.Key) { if key == tcell.KeyEsc || key == tcell.KeyEnter { - browser.SetCurrentTab(strconv.Itoa(curTab)) + panels.HidePanel("help") App.SetFocus(tabs[curTab].view) App.Draw() } @@ -115,5 +111,6 @@ func helpInit() { } w.Flush() - browser.AddTab("help", "Help", helpTable) + + panels.AddPanel("help", helpTable, true, false) }