diff options
| author | Albert Cervin <albert@acervin.com> | 2024-03-07 20:19:26 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2024-03-07 20:19:26 +0100 |
| commit | a13750209b3836a4a6a16a7ba881625f397f160f (patch) | |
| tree | 86c6ee6af1b44b613c6abc913957dda000c069a7 /src/dged/buffer.h | |
| parent | f266c624ad197ea6add738df70702dcbf93cb198 (diff) | |
| download | dged-a13750209b3836a4a6a16a7ba881625f397f160f.tar.gz dged-a13750209b3836a4a6a16a7ba881625f397f160f.tar.xz dged-a13750209b3836a4a6a16a7ba881625f397f160f.zip | |
Implement timers properly
The timers shown with `M-x timers` are now actual timings.
Diffstat (limited to 'src/dged/buffer.h')
| -rw-r--r-- | src/dged/buffer.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ -312,6 +312,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. * * @param [in] buffer The buffer to undo in. @@ -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 |
