Introduce swap journaling crash recovery system with tests.
- Added detailed journaling system (`SwapManager`) for crash recovery, including edit recording and replay. - Integrated recovery prompts for handling swap files during file open flows. - Implemented swap file cleanup, checkpointing, and compaction mechanisms. - Added extensive unit tests for swap-related behaviors such as recovery prompts, file pruning, and corruption handling. - Updated CMake to include new test files.
This commit is contained in:
10
Buffer.cc
10
Buffer.cc
@@ -575,6 +575,16 @@ Buffer::delete_row(int row)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Buffer::replace_all_bytes(const std::string_view bytes)
|
||||
{
|
||||
content_.Clear();
|
||||
if (!bytes.empty())
|
||||
content_.Append(bytes.data(), bytes.size());
|
||||
rows_cache_dirty_ = true;
|
||||
}
|
||||
|
||||
|
||||
// Undo system accessors
|
||||
UndoSystem *
|
||||
Buffer::Undo()
|
||||
|
||||
Reference in New Issue
Block a user