Add swap file journaling for crash recovery.
- Introduced `SwapManager` for buffering and writing incremental edits to sidecar `.kte.swp` files. - Implemented basic operations: insertion, deletion, split, join, and checkpointing. - Added recovery design doc (`docs/plans/swap-files.md`). - Updated editor initialization to integrate `SwapManager` instance for crash recovery across buffers.
This commit is contained in:
@@ -55,6 +55,8 @@ TerminalFrontend::Init(Editor &ed)
|
||||
prev_r_ = r;
|
||||
prev_c_ = c;
|
||||
ed.SetDimensions(static_cast<std::size_t>(r), static_cast<std::size_t>(c));
|
||||
// Attach editor to input handler for editor-owned features (e.g., universal argument)
|
||||
input_.Attach(&ed);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -100,4 +102,4 @@ TerminalFrontend::Shutdown()
|
||||
have_orig_tio_ = false;
|
||||
}
|
||||
endwin();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user