Skip to content

Avoid saving cancelled task edits - #36

Open
oiahoon wants to merge 1 commit into
RohanAdwankar:mainfrom
oiahoon:fix/cancel-task-edit
Open

Avoid saving cancelled task edits#36
oiahoon wants to merge 1 commit into
RohanAdwankar:mainfrom
oiahoon:fix/cancel-task-edit

Conversation

@oiahoon

@oiahoon oiahoon commented Jul 11, 2026

Copy link
Copy Markdown

Summary

  • distinguish task edit continuation, save, and cancel actions
  • return to normal mode without saving when the edit is cancelled
  • clear a pending o/O insertion position when its edit is cancelled
  • cover Escape and Enter behavior with focused unit tests

Why

Task editing previously returned the same boolean for both Enter and Escape. The caller treated either result as a completed save, so pressing i followed by Escape created a blank task. This addresses the task-edit cancellation behavior described in #32 without changing recurrence generation.

Validation

  • cargo test --locked (7 passed)
  • cargo check --locked --all-targets --all-features
  • cargo clippy --locked --all-targets --all-features
  • cargo fmt -- --check
  • manual TUI: i then Escape leaves no data file or task
  • manual TUI: o then Escape followed by a normal insert creates one task at order 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant