Fix data race.

+ Add thread-safety with mutexes in `PieceTable` and `Buffer`
+ Bump version to 1.5.9
This commit is contained in:
2026-01-28 01:03:58 -08:00
parent 8634eb78f0
commit d2d155f211
5 changed files with 116 additions and 83 deletions

View File

@@ -14,6 +14,7 @@
#include <cstdint>
#include "syntax/HighlighterEngine.h"
#include "Highlight.h"
#include <mutex>
// Forward declaration for swap journal integration
namespace kte {
@@ -482,4 +483,6 @@ private:
std::unique_ptr<kte::HighlighterEngine> highlighter_;
// Non-owning pointer to swap recorder managed by Editor/SwapManager
kte::SwapRecorder *swap_rec_ = nullptr;
mutable std::mutex buffer_mutex_;
};