1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-01 22:52:01 +02:00

rename to filtered mode

This commit is contained in:
Jesse Duffield
2020-03-29 10:11:15 +11:00
parent 624ae45ebb
commit a2790cfe8e
14 changed files with 106 additions and 93 deletions

View File

@@ -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)
}