diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-02-16 21:01:17 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-02-16 21:01:17 +1100 |
commit | e011e9bc4238b97a70ac6e4b35a862a028ce55e4 (patch) | |
tree | b4812f422ee3b38844796617299a5cecc7835369 /pkg/gui/view_helpers.go | |
parent | ad93b4c863dfaa6a1cb6bb740d0dba87fef14404 (diff) |
more work on rebasing feature
Diffstat (limited to 'pkg/gui/view_helpers.go')
-rw-r--r-- | pkg/gui/view_helpers.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 45c470978..53cf80de5 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -127,19 +127,11 @@ func (gui *Gui) returnFocus(g *gocui.Gui, v *gocui.View) error { } // pass in oldView = nil if you don't want to be able to return to your old view +// TODO: move some of this logic into our onFocusLost and onFocus hooks func (gui *Gui) switchFocus(g *gocui.Gui, oldView, newView *gocui.View) error { // we assume we'll never want to return focus to a confirmation panel i.e. // we should never stack confirmation panels if oldView != nil && oldView.Name() != "confirmation" { - oldView.Highlight = false - message := gui.Tr.TemplateLocalize( - "settingPreviewsViewTo", - Teml{ - "oldViewName": oldView.Name(), - }, - ) - gui.Log.Info(message) - // second class panels should never have focus restored to them because // once they lose focus they are effectively 'destroyed' secondClassPanels := []string{"confirmation", "menu"} @@ -148,7 +140,7 @@ func (gui *Gui) switchFocus(g *gocui.Gui, oldView, newView *gocui.View) error { } } - newView.Highlight = true + gui.Log.Info("setting highlight to true for view" + newView.Name()) message := gui.Tr.TemplateLocalize( "newFocusedViewIs", Teml{ |