summaryrefslogtreecommitdiffstats
path: root/pkg/gui/commits_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-02-16 15:17:44 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-02-16 15:17:44 +1100
commitad93b4c863dfaa6a1cb6bb740d0dba87fef14404 (patch)
tree125d6bf54cdbf582d689cfe62e630866d7fc2a8e /pkg/gui/commits_panel.go
parent198cbee498e9201b1f12514f909eb3da98db5ec7 (diff)
consider whether the view has focus when rendering the contents of a view
Diffstat (limited to 'pkg/gui/commits_panel.go')
-rw-r--r--pkg/gui/commits_panel.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go
index 0c557b15d..e791cf87b 100644
--- a/pkg/gui/commits_panel.go
+++ b/pkg/gui/commits_panel.go
@@ -47,7 +47,8 @@ func (gui *Gui) refreshCommits(g *gocui.Gui) error {
gui.refreshSelectedLine(&gui.State.Panels.Commits.SelectedLine, len(gui.State.Commits))
- list, err := utils.RenderList(gui.State.Commits)
+ isFocused := gui.g.CurrentView().Name() == "commits"
+ list, err := utils.RenderList(gui.State.Commits, isFocused)
if err != nil {
return err
}