summaryrefslogtreecommitdiffstats
path: root/pkg/gui/reflog_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-03-29 10:11:15 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-03-29 11:37:29 +1100
commita2790cfe8e6705ebd81c63df2154ec82cb645ae3 (patch)
treeba41523fe4726471a8dfab7c29c93a0365dcb67b /pkg/gui/reflog_panel.go
parent624ae45ebb3f54499a25c4eba0844fa971277c34 (diff)
rename to filtered mode
Diffstat (limited to 'pkg/gui/reflog_panel.go')
-rw-r--r--pkg/gui/reflog_panel.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/gui/reflog_panel.go b/pkg/gui/reflog_panel.go
index fa7f994ee..55738c445 100644
--- a/pkg/gui/reflog_panel.go
+++ b/pkg/gui/reflog_panel.go
@@ -10,11 +10,12 @@ import (
func (gui *Gui) getSelectedReflogCommit() *commands.Commit {
selectedLine := gui.State.Panels.ReflogCommits.SelectedLine
- if selectedLine == -1 || len(gui.State.ReflogCommits) == 0 {
+ reflogComits := gui.State.ReflogCommits
+ if selectedLine == -1 || len(reflogComits) == 0 {
return nil
}
- return gui.State.ReflogCommits[selectedLine]
+ return reflogComits[selectedLine]
}
func (gui *Gui) handleReflogCommitSelect(g *gocui.Gui, v *gocui.View) error {
@@ -37,7 +38,7 @@ func (gui *Gui) handleReflogCommitSelect(g *gocui.Gui, v *gocui.View) error {
v.FocusPoint(0, gui.State.Panels.ReflogCommits.SelectedLine)
cmd := gui.OSCommand.ExecutableFromString(
- gui.GitCommand.ShowCmdStr(commit.Sha, gui.State.LogScope),
+ gui.GitCommand.ShowCmdStr(commit.Sha, gui.State.FilterPath),
)
if err := gui.newPtyTask("main", cmd); err != nil {
gui.Log.Error(err)
@@ -52,7 +53,7 @@ func (gui *Gui) refreshReflogCommits() error {
lastReflogCommit = gui.State.ReflogCommits[0]
}
- commits, onlyObtainedNewReflogCommits, err := gui.GitCommand.GetReflogCommits(lastReflogCommit, gui.State.LogScope)
+ commits, onlyObtainedNewReflogCommits, err := gui.GitCommand.GetReflogCommits(lastReflogCommit, gui.State.FilterPath)
if err != nil {
return gui.surfaceError(err)
}