aboutsummaryrefslogtreecommitdiff
path: root/text-objects.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-09-10 11:46:59 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-09-10 11:46:59 +0200
commit18aa993466ab857b2a56612dabd243992e987998 (patch)
tree4e7d4ca1df42eb25ed65bea36894595766e7b22f /text-objects.h
parentdeca6f4d03d36e4980715ae6709f244f381b1175 (diff)
downloadvis-18aa993466ab857b2a56612dabd243992e987998.tar.gz
vis-18aa993466ab857b2a56612dabd243992e987998.tar.xz
Add comments where appropriate
Diffstat (limited to 'text-objects.h')
-rw-r--r--text-objects.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/text-objects.h b/text-objects.h
index 5b3895d..a1e30f9 100644
--- a/text-objects.h
+++ b/text-objects.h
@@ -1,18 +1,25 @@
#ifndef TEXT_OBJECTS_H
#define TEXT_OBJECTS_H
+/* these functions all take a file position. if this position is part of the
+ * respective text-object, a corresponding range is returned. if there is no
+ * such text-object at the given location, an empty range is returned.
+ */
+
#include <stddef.h>
#include "text.h"
-/* word which happens to be at pos, includes trailing white spaces. if at pos happens to
- * be a whitespace include all neighbouring leading whitespaces and the following word. */
+/* word which happens to be at pos, includes trailing white spaces. if at pos
+ * happens to be a whitespace include all neighbouring leading whitespaces
+ * and the following word. */
Filerange text_object_word(Text*, size_t pos);
Filerange text_object_word_boundry(Text*, size_t pos, int (*isboundry)(int));
Filerange text_object_line(Text*, size_t pos);
Filerange text_object_sentence(Text*, size_t pos);
Filerange text_object_paragraph(Text*, size_t pos);
-/* the delimiters themself are not included in the range */
+/* these are inner text objects i.e. the delimiters themself are not
+ * included in the range */
Filerange text_object_square_bracket(Text*, size_t pos);
Filerange text_object_curly_bracket(Text*, size_t pos);
Filerange text_object_angle_bracket(Text*, size_t pos);