diff options
| author | Albert Cervin <albert@acervin.com> | 2025-11-26 21:31:39 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2025-11-26 21:42:27 +0100 |
| commit | 7096e5f7f2dd6e00d1440990cde88fd28feca5a1 (patch) | |
| tree | c76372130418e244316b3fb52c9b51103baf49ad /src/dged/buffer.h | |
| parent | 8de2328d2e712fc892d6f02d92feb88fa857e85b (diff) | |
| download | dged-7096e5f7f2dd6e00d1440990cde88fd28feca5a1.tar.gz dged-7096e5f7f2dd6e00d1440990cde88fd28feca5a1.tar.xz dged-7096e5f7f2dd6e00d1440990cde88fd28feca5a1.zip | |
Add proper undo to buffer reloading
It now creates an undo entry for the whole file.
Diffstat (limited to 'src/dged/buffer.h')
| -rw-r--r-- | src/dged/buffer.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dged/buffer.h b/src/dged/buffer.h index 25cc42b..640150a 100644 --- a/src/dged/buffer.h +++ b/src/dged/buffer.h @@ -435,6 +435,15 @@ struct text_chunk buffer_line(struct buffer *buffer, uint32_t line); struct text_chunk buffer_region(struct buffer *buffer, struct region region); /** + * Get all text in the buffer. + * + * @param buffer The buffer to get text from. + * + * @returns A text chunk describing the full buffer + */ +struct text_chunk buffer_text(struct buffer *buffer); + +/** * Add a text property to a region of the buffer. * * @param buffer The buffer to add a text property to. |
