diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index f8155db2d..93eb78180 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -82,7 +82,7 @@ func (gui *Gui) refreshBranches() { gui.refreshStatus() } -func (gui *Gui) renderLocalBranchesWithSelection() error { +func (gui *Gui) renderLocalBranchesContext() error { branchesView := gui.getBranchesView() gui.refreshSelectedLine(&gui.State.Panels.Branches.SelectedLine, len(gui.State.Branches)) diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 326a892e9..967f8184a 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -626,7 +626,7 @@ func (gui *Gui) handleCheckoutCommit(g *gocui.Gui, v *gocui.View) error { }) } -func (gui *Gui) renderBranchCommitsWithSelection() error { +func (gui *Gui) renderBranchCommitsContext() error { commitsView := gui.getCommitsView() gui.refreshSelectedLine(&gui.State.Panels.Commits.SelectedLine, len(gui.State.Commits)) diff --git a/pkg/gui/list_context.go b/pkg/gui/list_context.go index 19cab887d..d2dc59e9d 100644 --- a/pkg/gui/list_context.go +++ b/pkg/gui/list_context.go @@ -197,7 +197,7 @@ func (gui *Gui) branchesListContext() *ListContext { GetSelectedLineIdxPtr: func() *int { return &gui.State.Panels.Branches.SelectedLine }, OnFocus: gui.handleBranchSelect, OnItemSelect: gui.handleBranchSelect, - OnRender: gui.renderLocalBranchesWithSelection, + OnRender: gui.renderLocalBranchesContext, Gui: gui, RendersToMainView: true, Kind: SIDE_CONTEXT, @@ -213,7 +213,7 @@ func (gui *Gui) remotesListContext() *ListContext { OnFocus: gui.handleRemoteSelect, OnItemSelect: gui.handleRemoteSelect, OnClickSelectedItem: gui.handleRemoteEnter, - OnRender: gui.renderRemotesWithSelection, + OnRender: gui.renderRemotesContext, Gui: gui, RendersToMainView: true, Kind: SIDE_CONTEXT, @@ -228,7 +228,7 @@ func (gui *Gui) remoteBranchesListContext() *ListContext { GetSelectedLineIdxPtr: func() *int { return &gui.State.Panels.RemoteBranches.SelectedLine }, OnFocus: gui.handleRemoteBranchSelect, OnItemSelect: gui.handleRemoteBranchSelect, - OnRender: gui.renderRemoteBranchesWithSelection, + OnRender: gui.renderRemoteBranchesContext, Gui: gui, RendersToMainView: true, Kind: SIDE_CONTEXT, @@ -243,7 +243,7 @@ func (gui *Gui) tagsListContext() *ListContext { GetSelectedLineIdxPtr: func() *int { return &gui.State.Panels.Tags.SelectedLine }, OnFocus: gui.handleTagSelect, OnItemSelect: gui.handleTagSelect, - OnRender: gui.renderTagsWithSelection, + OnRender: gui.renderTagsContext, Gui: gui, RendersToMainView: true, Kind: SIDE_CONTEXT, @@ -259,7 +259,7 @@ func (gui *Gui) branchCommitsListContext() *ListContext { OnFocus: gui.handleCommitSelect, OnItemSelect: gui.handleCommitSelect, OnClickSelectedItem: gui.handleSwitchToCommitFilesPanel, - OnRender: gui.renderBranchCommitsWithSelection, + OnRender: gui.renderBranchCommitsContext, Gui: gui, RendersToMainView: true, Kind: SIDE_CONTEXT, @@ -274,7 +274,7 @@ func (gui *Gui) reflogCommitsListContext() *ListContext { GetSelectedLineIdxPtr: func() *int { return &gui.State.Panels.ReflogCommits.SelectedLine }, OnFocus: gui.handleReflogCommitSelect, OnItemSelect: gui.handleReflogCommitSelect, - OnRender: gui.renderReflogCommitsWithSelection, + OnRender: gui.renderReflogCommitsContext, Gui: gui, RendersToMainView: true, Kind: SIDE_CONTEXT, diff --git a/pkg/gui/reflog_panel.go b/pkg/gui/reflog_panel.go index 03a1ed2be..093338e66 100644 --- a/pkg/gui/reflog_panel.go +++ b/pkg/gui/reflog_panel.go @@ -88,7 +88,7 @@ func (gui *Gui) refreshReflogCommits() error { return gui.postRefreshUpdate(gui.Contexts.ReflogCommits.Context) } -func (gui *Gui) renderReflogCommitsWithSelection() error { +func (gui *Gui) renderReflogCommitsContext() error { commitsView := gui.getCommitsView() gui.refreshSelectedLine(&gui.State.Panels.ReflogCommits.SelectedLine, len(gui.State.FilteredReflogCommits)) diff --git a/pkg/gui/remote_branches_panel.go b/pkg/gui/remote_branches_panel.go index 6e39c8cad..be4f79526 100644 --- a/pkg/gui/remote_branches_panel.go +++ b/pkg/gui/remote_branches_panel.go @@ -51,7 +51,7 @@ func (gui *Gui) handleRemoteBranchesEscape(g *gocui.Gui, v *gocui.View) error { return gui.switchContext(gui.Contexts.Remotes.Context) } -func (gui *Gui) renderRemoteBranchesWithSelection() error { +func (gui *Gui) renderRemoteBranchesContext() error { branchesView := gui.getBranchesView() gui.refreshSelectedLine(&gui.State.Panels.RemoteBranches.SelectedLine, len(gui.State.RemoteBranches)) diff --git a/pkg/gui/remotes_panel.go b/pkg/gui/remotes_panel.go index 793e177a5..5c64f7f3d 100644 --- a/pkg/gui/remotes_panel.go +++ b/pkg/gui/remotes_panel.go @@ -70,7 +70,7 @@ func (gui *Gui) refreshRemotes() error { return gui.postRefreshUpdate(gui.contextForContextKey(gui.getBranchesView().Context)) } -func (gui *Gui) renderRemotesWithSelection() error { +func (gui *Gui) renderRemotesContext() error { branchesView := gui.getBranchesView() gui.refreshSelectedLine(&gui.State.Panels.Remotes.SelectedLine, len(gui.State.Remotes)) diff --git a/pkg/gui/tags_panel.go b/pkg/gui/tags_panel.go index eb27f916d..9d151d4d8 100644 --- a/pkg/gui/tags_panel.go +++ b/pkg/gui/tags_panel.go @@ -54,13 +54,13 @@ func (gui *Gui) refreshTags() error { gui.State.Tags = tags if gui.getBranchesView().Context == "tags" { - return gui.renderTagsWithSelection() + return gui.renderTagsContext() } return nil } -func (gui *Gui) renderTagsWithSelection() error { +func (gui *Gui) renderTagsContext() error { branchesView := gui.getBranchesView() gui.refreshSelectedLine(&gui.State.Panels.Tags.SelectedLine, len(gui.State.Tags)) @@ -145,7 +145,7 @@ func (gui *Gui) handleCreateTag(g *gocui.Gui, v *gocui.View) error { for i, tag := range gui.State.Tags { if tag.Name == tagName { gui.State.Panels.Tags.SelectedLine = i - gui.renderTagsWithSelection() + gui.renderTagsContext() return } }