diff options
author | pommicket <pommicket@gmail.com> | 2023-08-05 14:02:00 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-08-05 14:02:00 -0400 |
commit | 4726bd906ac8c165a10d819a33ccb3697f8040a9 (patch) | |
tree | 8ab8d0357ceecf281fef89a6c21444c6a73f8d95 /buffer.c | |
parent | 4ab3631aadcd27df708a16f6bf22953e0ff9b1cf (diff) |
more plugin prep
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -14,6 +14,16 @@ struct Line { char32_t *str; }; +// This refers to replacing prev_len characters (found in prev_text) at pos with new_len characters +struct BufferEdit { + bool chain; // should this + the next edit be treated as one? + BufferPos pos; + u32 new_len; + u32 prev_len; + char32_t *prev_text; + double time; // time at start of edit (i.e. the time just before the edit), in seconds since epoch +}; + // this is a macro so we get -Wformat warnings #define buffer_error(buffer, ...) \ snprintf(buffer->error, sizeof buffer->error - 1, __VA_ARGS__) |