diff options
-rw-r--r-- | pkg/gui/context.go | 4 | ||||
-rw-r--r-- | pkg/gui/diffing.go | 2 | ||||
-rw-r--r-- | pkg/gui/keybindings.go | 40 | ||||
-rw-r--r-- | pkg/gui/layout.go | 2 | ||||
-rw-r--r-- | pkg/gui/line_by_line_panel.go | 2 | ||||
-rw-r--r-- | pkg/gui/list_context.go | 2 | ||||
-rw-r--r-- | pkg/gui/patch_options_panel.go | 2 |
7 files changed, 27 insertions, 27 deletions
diff --git a/pkg/gui/context.go b/pkg/gui/context.go index 9f66481c4..5916307f4 100644 --- a/pkg/gui/context.go +++ b/pkg/gui/context.go @@ -191,7 +191,7 @@ func (gui *Gui) contextTree() ContextTree { }, Kind: MAIN_CONTEXT, ViewName: "main", - Key: "patch-building", + Key: "patchBuilding", }, }, Merging: SimpleContextNode{ @@ -526,7 +526,7 @@ func (gui *Gui) changeMainViewsContext(context string) { } switch context { - case "normal", "patch-building", "staging", "merging": + case "normal", "patchBuilding", "staging", "merging": gui.getMainView().Context = context gui.getSecondaryView().Context = context default: diff --git a/pkg/gui/diffing.go b/pkg/gui/diffing.go index ff52bdeb9..178beb236 100644 --- a/pkg/gui/diffing.go +++ b/pkg/gui/diffing.go @@ -44,7 +44,7 @@ func (gui *Gui) currentDiffTerminals() []string { switch gui.currentContextKey() { case "files": // not supporting files for now - case "commit-files": + case "commitFiles": // not supporting commit files for now case "branch-commits": item := gui.getSelectedCommit() diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 7417d6782..be80b4608 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -998,84 +998,84 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { }, { ViewName: "main", - Contexts: []string{"patch-building"}, + Contexts: []string{"patchBuilding"}, Key: gui.getKey("universal.return"), Handler: gui.wrappedHandler(gui.handleEscapePatchBuildingPanel), Description: gui.Tr.SLocalize("ExitLineByLineMode"), }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("universal.openFile"), Handler: gui.wrappedHandler(gui.handleOpenFileAtLine), Description: gui.Tr.SLocalize("openFile"), }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("universal.prevItem"), Handler: gui.handleSelectPrevLine, Description: gui.Tr.SLocalize("PrevLine"), }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("universal.nextItem"), Handler: gui.handleSelectNextLine, Description: gui.Tr.SLocalize("NextLine"), }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("universal.prevItem-alt"), Modifier: gocui.ModNone, Handler: gui.handleSelectPrevLine, }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("universal.nextItem-alt"), Modifier: gocui.ModNone, Handler: gui.handleSelectNextLine, }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gocui.MouseWheelUp, Modifier: gocui.ModNone, Handler: gui.handleSelectPrevLine, }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gocui.MouseWheelDown, Modifier: gocui.ModNone, Handler: gui.handleSelectNextLine, }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("universal.prevBlock"), Handler: gui.handleSelectPrevHunk, Description: gui.Tr.SLocalize("PrevHunk"), }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("universal.nextBlock"), Handler: gui.handleSelectNextHunk, Description: gui.Tr.SLocalize("NextHunk"), }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("universal.prevBlock-alt"), Modifier: gocui.ModNone, Handler: gui.handleSelectPrevHunk, }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("universal.nextBlock-alt"), Modifier: gocui.ModNone, Handler: gui.handleSelectNextHunk, @@ -1096,14 +1096,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { }, { ViewName: "main", - Contexts: []string{"patch-building"}, + Contexts: []string{"patchBuilding"}, Key: gui.getKey("universal.select"), Handler: gui.handleToggleSelectionForPatch, Description: gui.Tr.SLocalize("ToggleSelectionForPatch"), }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("main.toggleDragSelect"), Handler: gui.handleToggleSelectRange, Description: gui.Tr.SLocalize("ToggleDragSelect"), @@ -1111,42 +1111,42 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { // Alias 'V' -> 'v' { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("main.toggleDragSelect-alt"), Handler: gui.handleToggleSelectRange, Description: gui.Tr.SLocalize("ToggleDragSelect"), }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gui.getKey("main.toggleSelectHunk"), Handler: gui.handleToggleSelectHunk, Description: gui.Tr.SLocalize("ToggleSelectHunk"), }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gocui.MouseLeft, Modifier: gocui.ModNone, Handler: gui.handleMouseDown, }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gocui.MouseLeft, Modifier: gocui.ModMotion, Handler: gui.handleMouseDrag, }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gocui.MouseWheelUp, Modifier: gocui.ModNone, Handler: gui.handleMouseScrollUp, }, { ViewName: "main", - Contexts: []string{"patch-building", "staging"}, + Contexts: []string{"patchBuilding", "staging"}, Key: gocui.MouseWheelDown, Modifier: gocui.ModNone, Handler: gui.handleMouseScrollDown, diff --git a/pkg/gui/layout.go b/pkg/gui/layout.go index 96144df98..eb3760046 100644 --- a/pkg/gui/layout.go +++ b/pkg/gui/layout.go @@ -299,7 +299,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { {view: commitsView, contextKey: "branch-commits", selectedLine: gui.State.Panels.Commits.SelectedLine, lineCount: len(gui.State.Commits), listContext: gui.branchCommitsListContext()}, {view: commitsView, contextKey: "reflog-commits", selectedLine: gui.State.Panels.ReflogCommits.SelectedLine, lineCount: len(gui.State.FilteredReflogCommits), listContext: gui.reflogCommitsListContext()}, {view: stashView, contextKey: "stash", selectedLine: gui.State.Panels.Stash.SelectedLine, lineCount: len(gui.State.StashEntries), listContext: gui.stashListContext()}, - {view: commitFilesView, contextKey: "commit-files", selectedLine: gui.State.Panels.CommitFiles.SelectedLine, lineCount: len(gui.State.CommitFiles), listContext: gui.commitFilesListContext()}, + {view: commitFilesView, contextKey: "commitFiles", selectedLine: gui.State.Panels.CommitFiles.SelectedLine, lineCount: len(gui.State.CommitFiles), listContext: gui.commitFilesListContext()}, } // menu view might not exist so we check to be safe diff --git a/pkg/gui/line_by_line_panel.go b/pkg/gui/line_by_line_panel.go index 4ae8e741a..cd1d289dc 100644 --- a/pkg/gui/line_by_line_panel.go +++ b/pkg/gui/line_by_line_panel.go @@ -332,7 +332,7 @@ func (gui *Gui) handleOpenFileAtLine() error { // again, would be good to use inheritance here (or maybe even composition) var filename string switch gui.State.MainContext { - case "patch-building": + case "patchBuilding": filename = gui.getSelectedCommitFileName() case "staging": file := gui.getSelectedFile() diff --git a/pkg/gui/list_context.go b/pkg/gui/list_context.go index 79195a873..98e62cbc1 100644 --- a/pkg/gui/list_context.go +++ b/pkg/gui/list_context.go @@ -326,7 +326,7 @@ func (gui *Gui) stashListContext() *ListContext { func (gui *Gui) commitFilesListContext() *ListContext { return &ListContext{ ViewName: "commitFiles", - ContextKey: "commit-files", + ContextKey: "commitFiles", GetItemsLength: func() int { return len(gui.State.CommitFiles) }, GetSelectedLineIdxPtr: func() *int { return &gui.State.Panels.CommitFiles.SelectedLine }, OnFocus: gui.handleCommitFileSelect, diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go index b715a4b61..78c1d1858 100644 --- a/pkg/gui/patch_options_panel.go +++ b/pkg/gui/patch_options_panel.go @@ -77,7 +77,7 @@ func (gui *Gui) validateNormalWorkingTreeState() (bool, error) { } func (gui *Gui) returnFocusFromLineByLinePanelIfNecessary() error { - if gui.State.MainContext == "patch-building" { + if gui.State.MainContext == "patchBuilding" { return gui.handleEscapePatchBuildingPanel() } return nil |