From 7096e5f7f2dd6e00d1440990cde88fd28feca5a1 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Wed, 26 Nov 2025 21:31:39 +0100 Subject: Add proper undo to buffer reloading It now creates an undo entry for the whole file. --- src/dged/buffer.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/dged/buffer.h') 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 @@ -434,6 +434,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. * -- cgit v1.2.3