From a13750209b3836a4a6a16a7ba881625f397f160f Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Thu, 7 Mar 2024 20:19:26 +0100 Subject: Implement timers properly The timers shown with `M-x timers` are now actual timings. --- src/dged/buffer.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/dged/buffer.h') diff --git a/src/dged/buffer.h b/src/dged/buffer.h index 3cb8d03..496086a 100644 --- a/src/dged/buffer.h +++ b/src/dged/buffer.h @@ -311,6 +311,18 @@ struct location buffer_newline(struct buffer *buffer, struct location at); */ struct location buffer_indent(struct buffer *buffer, struct location at); +/** + * Insert alternative indentation in the buffer. + * + * Alternative indentation is spaces if it is normally using tabs + * and vice versa. + * + * @param [in] buffer The buffer to indent in. + * @param [in] at The location to insert indentation at. + * @returns The position after indenting. + */ +struct location buffer_indent_alt(struct buffer *buffer, struct location at); + /** * Undo the last operation in the buffer. * @@ -530,4 +542,14 @@ void buffer_render(struct buffer *buffer, struct buffer_render_params *params); uint32_t visual_string_width(uint8_t *txt, uint32_t len, uint32_t start_col, uint32_t end_col); +/** + * Sort lines in a buffer alphabetically. + * + * @param [in] buffer The buffer to sort lines in. + * @param [in] start_line The first line to sort. + * @param [in] end_line The last line to sort. + */ +void buffer_sort_lines(struct buffer *buffer, uint32_t start_line, + uint32_t end_line); + #endif -- cgit v1.2.3