summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-10 10:55:51 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-11 14:50:02 -0500
commit5bffb50207f8d8ba873f4c40dde4859179153001 (patch)
tree6d1c574838b94273af4021b0a5453a3948c85887 /ted.h
parent4f2a012a5dbad755bd621a3308a306afd4589fd5 (diff)
chain replace all into one undo event
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ted.h b/ted.h
index b1d5554..60cb06d 100644
--- a/ted.h
+++ b/ted.h
@@ -114,6 +114,7 @@ typedef struct {
// this refers to replacing prev_len characters (found in prev_text) at pos with new_len characters
typedef struct BufferEdit {
+ bool chain; // should this + the next edit be treated as one?
BufferPos pos;
u32 new_len;
u32 prev_len;
@@ -134,6 +135,8 @@ typedef struct {
// This is set to true whenever a change is made to the buffer, and never set to false by buffer_ functions.
// (Distinct from buffer_unsaved_changes)
bool modified;
+ bool will_chain_edits;
+ bool chaining_edits; // are we chaining undo events together?
float x1, y1, x2, y2;
u32 nlines;
u32 lines_capacity;