summaryrefslogtreecommitdiff
path: root/src/dged/buffer.h
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2024-02-12 16:28:37 +0100
committerAlbert Cervin <albert@acervin.com>2024-02-14 13:08:51 +0100
commit0b524a94a5e34148716832f1b6cada02e35369b0 (patch)
treec0b31aab359c2bac7300a3c95a2f50ee62572048 /src/dged/buffer.h
parent7baa6f58d4fe8b00ec5ee7dd72a8cb32ef52c079 (diff)
downloaddged-0b524a94a5e34148716832f1b6cada02e35369b0.tar.gz
dged-0b524a94a5e34148716832f1b6cada02e35369b0.tar.xz
dged-0b524a94a5e34148716832f1b6cada02e35369b0.zip
Improve word deletion
Now it only deletes the word under dot.
Diffstat (limited to 'src/dged/buffer.h')
-rw-r--r--src/dged/buffer.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dged/buffer.h b/src/dged/buffer.h
index 2e71fb3..3cb8d03 100644
--- a/src/dged/buffer.h
+++ b/src/dged/buffer.h
@@ -245,6 +245,17 @@ struct location buffer_next_word(struct buffer *buffer, struct location dot);
struct location buffer_next_line(struct buffer *buffer, struct location dot);
/**
+ * Get the extents of the word located at @ref at.
+ *
+ * @param [in] buffer The buffer to look in.
+ * @param [in] at The location to start from.
+ *
+ * @returns The extent of the closest word as a region. If
+ * there is no word, the region will be zero-sized.
+ */
+struct region buffer_word_at(struct buffer *buffer, struct location at);
+
+/**
* Clamp a buffer position to the boundaries of the buffer.
*
* Note that both @ref line and @ref col can be negative or bigger than the