1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00

update naming to refer to context

This commit is contained in:
Jesse Duffield 2020-08-19 19:33:59 +10:00
parent b77abdc5e1
commit f601108c5d
7 changed files with 14 additions and 14 deletions

View File

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

View File

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

View File

@ -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,

View File

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

View File

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

View File

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

View File

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