Decouple hiding the working tree state from blocking input

Blocking keyboard input and hiding the working tree state mode are two
separate concerns; they were fused into one helper because every caller
so far wanted both. A caller that blocks input for something other than a
rebase would then hide the "Rebasing" indicator for the duration of its
operation, which has nothing to do with it.

Make it an explicit option instead, so blocking input on its own doesn't
imply anything about the modes on display.
This commit is contained in:
Stefan Haller
2026-08-05 17:29:20 +02:00
parent f4968f6839
commit e54cb4bf42
7 changed files with 106 additions and 36 deletions
+2 -2
View File
@@ -832,8 +832,8 @@ func NewGui(
return nil
},
func(message string, f func(gocui.Task) error) { gui.helpers.AppStatus.WithWaitingStatus(message, f) },
func(message string, f func(gocui.Task) error) {
gui.helpers.AppStatus.WithWaitingStatusBlockingInput(message, f)
func(opts types.WaitingStatusOpts, f func(gocui.Task) error) {
gui.helpers.AppStatus.WithWaitingStatusBlockingInput(opts, f)
},
func(message string, kind types.ToastKind) { gui.helpers.AppStatus.Toast(message, kind) },
func() string { return gui.Views.Prompt.TextArea.GetContent() },