1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

more standardisation

This commit is contained in:
Jesse Duffield
2020-08-19 21:51:50 +10:00
parent dbf6bb5f27
commit 419cb9feb8
11 changed files with 82 additions and 141 deletions

View File

@ -4,7 +4,6 @@ import (
"github.com/go-errors/errors"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/gui/presentation"
)
func (gui *Gui) getSelectedCommitFile() *commands.CommitFile {
@ -105,16 +104,6 @@ func (gui *Gui) refreshCommitFilesView() error {
return gui.postRefreshUpdate(gui.Contexts.BranchCommits.Files.Context)
}
func (gui *Gui) renderCommitFiles() error {
gui.refreshSelectedLine(&gui.State.Panels.CommitFiles.SelectedLine, len(gui.State.CommitFiles))
commitsFileView := gui.getCommitFilesView()
displayStrings := presentation.GetCommitFileListDisplayStrings(gui.State.CommitFiles, gui.State.Diff.Ref)
gui.renderDisplayStrings(commitsFileView, displayStrings)
return nil
}
func (gui *Gui) handleOpenOldCommitFile(g *gocui.Gui, v *gocui.View) error {
file := gui.getSelectedCommitFile()
if file == nil {