fix: make undo history fields atomic and protect clip buffer access in save/load thread
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
6
engine.h
6
engine.h
@@ -97,9 +97,9 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
UndoAction actions[MAX_UNDO_HISTORY];
|
||||
int undo_index; // Points to next action to undo
|
||||
int redo_index; // Points to next action to redo
|
||||
int count; // Total actions in history
|
||||
atomic_int undo_index; // Points to next action to undo
|
||||
atomic_int redo_index; // Points to next action to redo
|
||||
atomic_int count; // Total actions in history
|
||||
} UndoHistory;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user