Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .takt/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Ignore everything by default
*

# This file itself
!.gitignore

# Project configuration
!config.yaml

# Facets and workflows (version-controlled)
!workflows/
!workflows/**
!steps/
!steps/**
!facets/
!facets/personas/
!facets/personas/**
!facets/policies/
!facets/policies/**
!facets/knowledge/
!facets/knowledge/**
!facets/instructions/
!facets/instructions/**
!facets/output-contracts/
!facets/output-contracts/**
2 changes: 2 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ impl App {

match key.code {
KeyCode::Esc => {
self.buffer.snapshot();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High · Undo skips edits and redo disappears

When an Insert session ends after an edit, or Visual mode exits without an edit while redo history exists, the exit handlers call snapshot() on the current buffer, so undo() restores the post-edit state instead of reversing the edit; Visual-mode exits also clear redo_stack and add a no-op undo entry. Users see undo fail or redo history disappear.

Remove the unconditional snapshot() calls from both mode-exit handlers.

Also at src/app.rs:661.

Prompt for AI agents
In `src/app.rs` at line 626:

**Undo skips edits and redo disappears**

When an Insert session ends after an edit, or Visual mode exits without an edit while redo history exists, the exit handlers call `snapshot()` on the current buffer, so `undo()` restores the post-edit state instead of reversing the edit; Visual-mode exits also clear `redo_stack` and add a no-op undo entry. Users see undo fail or redo history disappear.

Remove the unconditional `snapshot()` calls from both mode-exit handlers.

Also at `src/app.rs:661`.

self.mode = Mode::Normal;
self.buffer.clamp_cursor(false);
}
Expand Down Expand Up @@ -657,6 +658,7 @@ impl App {
fn handle_visual_key(&mut self, key: KeyEvent) {
match key.code {
KeyCode::Esc => {
self.buffer.snapshot();
self.mode = Mode::Normal;
self.visual_start = None;
}
Expand Down
Loading