2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-05 00:00:14 +00:00

Only open search if active view is table. #150

This commit is contained in:
Miguel Mota 2021-08-29 01:51:15 -07:00
parent 6286450412
commit fb79419c84
No known key found for this signature in database
GPG Key ID: 67EC1161588A00F9

View File

@ -29,6 +29,9 @@ func NewInputView() *InputView {
// OpenSearch opens the search field
func (ct *Cointop) openSearch() error {
ct.debuglog("openSearch()")
if ct.ui.ActiveViewName() != ct.Views.Table.Name() {
return nil
}
ct.State.searchFieldVisible = true
ct.ui.SetCursor(true)
ct.SetActiveView(ct.Views.SearchField.Name())