1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +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

@@ -3,7 +3,6 @@ package gui
import (
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/gui/presentation"
)
// list panel functions
@@ -48,18 +47,7 @@ func (gui *Gui) handleStashEntrySelect() error {
func (gui *Gui) refreshStashEntries() error {
gui.State.StashEntries = gui.GitCommand.GetStashEntries(gui.State.FilterPath)
return gui.renderStash()
}
func (gui *Gui) renderStash() error {
gui.refreshSelectedLine(&gui.State.Panels.Stash.SelectedLine, len(gui.State.StashEntries))
stashView := gui.getStashView()
displayStrings := presentation.GetStashEntryListDisplayStrings(gui.State.StashEntries, gui.State.Diff.Ref)
gui.renderDisplayStrings(stashView, displayStrings)
return gui.resetOrigin(stashView)
return gui.Contexts.Stash.Context.HandleRender()
}
// specific functions