diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-02 17:27:01 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-04 09:07:15 +1100 |
commit | c82606a92a3433477f152a946e78c99dfd20db9d (patch) | |
tree | 8577a204a810aee182ae6b79e7c1c698fcb15e3b /pkg | |
parent | 194ff1630c11303e3de1c87f61103b3aadcd175d (diff) |
fix broken format call
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/gui/status_panel.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pkg/gui/status_panel.go b/pkg/gui/status_panel.go index d6985dd0d..de9dc08ce 100644 --- a/pkg/gui/status_panel.go +++ b/pkg/gui/status_panel.go @@ -71,9 +71,16 @@ func (gui *Gui) handleStatusClick() error { cx, _ := gui.Views.Status.Cursor() upstreamStatus := presentation.BranchStatus(currentBranch) repoName := utils.GetCurrentRepoName() - switch gui.GitCommand.WorkingTreeState() { + workingTreeState := gui.GitCommand.WorkingTreeState() + switch workingTreeState { case enums.REBASE_MODE_REBASING, enums.REBASE_MODE_MERGING: - workingTreeStatus := fmt.Sprintf("(%s)", gui.GitCommand.WorkingTreeState()) + var formattedState string + if workingTreeState == enums.REBASE_MODE_REBASING { + formattedState = "rebasing" + } else { + formattedState = "merging" + } + workingTreeStatus := fmt.Sprintf("(%s)", formattedState) if cursorInSubstring(cx, upstreamStatus+" ", workingTreeStatus) { return gui.handleCreateRebaseOptionsMenu() } |