summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-02-25 07:17:49 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-02-25 07:19:46 +1100
commit52b5a6410c33557f754c4a6cd3ce0c69220dc780 (patch)
treeaa4383636b5202bd03015693875d32dfba78798a /pkg
parent0034cfef5cb29937c8ac7daf65a5b5bfd1925331 (diff)
show item counts in frames
Diffstat (limited to 'pkg')
-rw-r--r--pkg/gui/gui.go4
-rw-r--r--pkg/gui/menu_panel.go1
2 files changed, 5 insertions, 0 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 0090e6c92..0a0dbe204 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -555,6 +555,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
filesView.Highlight = true
filesView.Title = gui.Tr.SLocalize("FilesTitle")
filesView.SetOnSelectItem(gui.onSelectItemWrapper(gui.onFilesPanelSearchSelect))
+ filesView.ContainsList = true
}
branchesView, err := g.SetViewBeneath("branches", "files", vHeights["branches"])
@@ -566,6 +567,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
branchesView.Tabs = []string{"Local Branches", "Remotes", "Tags"}
branchesView.FgColor = textColor
branchesView.SetOnSelectItem(gui.onSelectItemWrapper(gui.onBranchesPanelSearchSelect))
+ branchesView.ContainsList = true
}
if v, err := g.SetViewBeneath("commitFiles", "branches", vHeights["commits"]); err != nil {
@@ -586,6 +588,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
commitsView.Tabs = []string{"Commits", "Reflog"}
commitsView.FgColor = textColor
commitsView.SetOnSelectItem(gui.onSelectItemWrapper(gui.onCommitsPanelSearchSelect))
+ commitsView.ContainsList = true
}
stashView, err := g.SetViewBeneath("stash", "commits", vHeights["stash"])
@@ -596,6 +599,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
stashView.Title = gui.Tr.SLocalize("StashTitle")
stashView.FgColor = textColor
stashView.SetOnSelectItem(gui.onSelectItemWrapper(gui.onStashPanelSearchSelect))
+ stashView.ContainsList = true
}
if v, err := g.SetView("options", appStatusOptionsBoundary-1, height-2, optionsVersionBoundary-1, height, 0); err != nil {
diff --git a/pkg/gui/menu_panel.go b/pkg/gui/menu_panel.go
index 335b298b3..da511f6b2 100644
--- a/pkg/gui/menu_panel.go
+++ b/pkg/gui/menu_panel.go
@@ -76,6 +76,7 @@ func (gui *Gui) createMenu(title string, items []*menuItem, createMenuOptions cr
menuView, _ := gui.g.SetView("menu", x0, y0, x1, y1, 0)
menuView.Title = title
menuView.FgColor = theme.GocuiDefaultTextColor
+ menuView.ContainsList = true
menuView.Clear()
fmt.Fprint(menuView, list)
gui.State.Panels.Menu.SelectedLine = 0