summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/ui/table.go18
-rw-r--r--internal/ui/table_test.go2
2 files changed, 15 insertions, 5 deletions
diff --git a/internal/ui/table.go b/internal/ui/table.go
index ae32070..aac685b 100644
--- a/internal/ui/table.go
+++ b/internal/ui/table.go
@@ -85,15 +85,11 @@ type detailViewState struct {
detailBlinkField int // field currently blinking (-1 = none)
detailBlinkOn bool // whether the blink is currently on
detailBlinkCount int // number of blink cycles completed so far
- // detailDescEditing lives here (not in editState) because it drives an
- // external-editor launch from the detail overlay, not inline text input.
- detailDescEditing bool // whether the description editor is open
}
// ultraState holds the state for the ultra mode task list and its search UI.
type ultraState struct {
showUltra bool
- ultraStartup bool // true when ultra was set via --ultra flag; q quits directly, esc never does
ultraCursor int
ultraOffset int
ultraSearching bool
@@ -103,6 +99,18 @@ type ultraState struct {
ultraFocusedID int
}
+// detailEditState holds detail-overlay state that belongs to the external
+// description editor flow instead of the overlay itself.
+type detailEditState struct {
+ detailDescEditing bool
+}
+
+// ultraModeState holds ultra-mode lifecycle flags that are separate from the
+// cursor, search, and filter state.
+type ultraModeState struct {
+ ultraStartup bool
+}
+
// editState holds inline field-editing state for the task table.
// Each editing mode (annotate, desc, tags, …) is mutually exclusive;
// clearEditingModes resets them all before activating a new one.
@@ -158,6 +166,8 @@ type Model struct {
searchState // task-table and help-screen search (see searchState)
detailViewState // task detail overlay (see detailViewState)
ultraState // ultra mode task list and search state (see ultraState)
+ detailEditState // detail-overlay external description editor state
+ ultraModeState // ultra-mode lifecycle flags
editState // inline field editing (see editState)
cellExpanded bool
diff --git a/internal/ui/table_test.go b/internal/ui/table_test.go
index d8c9db4..fa6fbfe 100644
--- a/internal/ui/table_test.go
+++ b/internal/ui/table_test.go
@@ -228,7 +228,7 @@ func TestHandleDescEditDoneRemovesTempFileOnEditorError(t *testing.T) {
t.Fatal(err)
}
- m := Model{detailViewState: detailViewState{detailDescEditing: true}}
+ m := Model{detailEditState: detailEditState{detailDescEditing: true}}
mv, cmd := (&m).handleDescEditDone(descEditDoneMsg{
err: fmt.Errorf("editor failed"),
tempFile: tempFile,