summaryrefslogtreecommitdiff
path: root/src/dged/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dged/buffer.h')
-rw-r--r--src/dged/buffer.h22
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