diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-29 18:46:45 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-29 20:48:49 +1000 |
commit | 91f0b0e28fb93bf715a4fda67fcbb400ffbc680b (patch) | |
tree | aa6e19417268c86129e967997582006bfb6f3784 /pkg/gui | |
parent | 8d2af5cc61c8bc94da6f608598ff27aead491c6a (diff) |
move stash panel
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/custom_commands.go | 2 | ||||
-rw-r--r-- | pkg/gui/gui.go | 4 | ||||
-rw-r--r-- | pkg/gui/presentation/stash_entries.go | 6 | ||||
-rw-r--r-- | pkg/gui/stash_panel.go | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/pkg/gui/custom_commands.go b/pkg/gui/custom_commands.go index 67f90b36c..9d2483587 100644 --- a/pkg/gui/custom_commands.go +++ b/pkg/gui/custom_commands.go @@ -22,7 +22,7 @@ type CustomCommandObjects struct { SelectedRemoteBranch *models.RemoteBranch SelectedRemote *models.Remote SelectedTag *models.Tag - SelectedStashEntry *commands.StashEntry + SelectedStashEntry *models.StashEntry SelectedCommitFile *commands.CommitFile CheckedOutBranch *models.Branch PromptResponses []string diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index cdfa5d8b6..02bb27a65 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -276,7 +276,7 @@ type guiState struct { SubmoduleConfigs []*models.SubmoduleConfig Branches []*models.Branch Commits []*models.Commit - StashEntries []*commands.StashEntry + StashEntries []*models.StashEntry CommitFiles []*commands.CommitFile // FilteredReflogCommits are the ones that appear in the reflog panel. // when in filtering mode we only include the ones that match the given path @@ -353,7 +353,7 @@ func (gui *Gui) resetState() { Commits: make([]*models.Commit, 0), FilteredReflogCommits: make([]*models.Commit, 0), ReflogCommits: make([]*models.Commit, 0), - StashEntries: make([]*commands.StashEntry, 0), + StashEntries: make([]*models.StashEntry, 0), Panels: &panelStates{ // TODO: work out why some of these are -1 and some are 0. Last time I checked there was a good reason but I'm less certain now Files: &filePanelState{listPanelState{SelectedLineIdx: -1}}, diff --git a/pkg/gui/presentation/stash_entries.go b/pkg/gui/presentation/stash_entries.go index d1f54cc8a..d9985fcba 100644 --- a/pkg/gui/presentation/stash_entries.go +++ b/pkg/gui/presentation/stash_entries.go @@ -1,12 +1,12 @@ package presentation import ( - "github.com/jesseduffield/lazygit/pkg/commands" + "github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/utils" ) -func GetStashEntryListDisplayStrings(stashEntries []*commands.StashEntry, diffName string) [][]string { +func GetStashEntryListDisplayStrings(stashEntries []*models.StashEntry, diffName string) [][]string { lines := make([][]string, len(stashEntries)) for i := range stashEntries { @@ -18,7 +18,7 @@ func GetStashEntryListDisplayStrings(stashEntries []*commands.StashEntry, diffNa } // getStashEntryDisplayStrings returns the display string of branch -func getStashEntryDisplayStrings(s *commands.StashEntry, diffed bool) []string { +func getStashEntryDisplayStrings(s *models.StashEntry, diffed bool) []string { attr := theme.DefaultTextColor if diffed { attr = theme.DiffTerminalColor diff --git a/pkg/gui/stash_panel.go b/pkg/gui/stash_panel.go index 71f246417..765163408 100644 --- a/pkg/gui/stash_panel.go +++ b/pkg/gui/stash_panel.go @@ -2,12 +2,12 @@ package gui import ( "github.com/jesseduffield/gocui" - "github.com/jesseduffield/lazygit/pkg/commands" + "github.com/jesseduffield/lazygit/pkg/models" ) // list panel functions -func (gui *Gui) getSelectedStashEntry() *commands.StashEntry { +func (gui *Gui) getSelectedStashEntry() *models.StashEntry { selectedLine := gui.State.Panels.Stash.SelectedLineIdx if selectedLine == -1 { return nil |