aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-08-30 08:54:53 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-08-30 08:54:53 +0200
commit5f113ae207e955d08b660f7433c09b4526429026 (patch)
tree11731ffba28690b2de6896eacce5dddc94a3b11e
parentbb7e9122c85d9f486d9be5e62ba3c144662a390b (diff)
downloadvis-5f113ae207e955d08b660f7433c09b4526429026.tar.gz
vis-5f113ae207e955d08b660f7433c09b4526429026.tar.xz
Add trivial text motions to start and end of file
-rw-r--r--text-motions.c8
-rw-r--r--text-motions.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/text-motions.c b/text-motions.c
index 2b9cf8c..f499d92 100644
--- a/text-motions.c
+++ b/text-motions.c
@@ -5,6 +5,14 @@
// TODO: consistent usage of iterators either char or byte based where appropriate.
+size_t text_begin(Text *txt, size_t pos) {
+ return 0;
+}
+
+size_t text_end(Text *txt, size_t pos) {
+ return text_size(txt);
+}
+
size_t text_char_next(Text *txt, size_t pos) {
Iterator it = text_iterator_get(txt, pos);
text_iterator_char_next(&it, NULL);
diff --git a/text-motions.h b/text-motions.h
index 335adaf..597d4bc 100644
--- a/text-motions.h
+++ b/text-motions.h
@@ -4,6 +4,9 @@
#include <stddef.h>
#include "text.h"
+size_t text_begin(Text*, size_t pos);
+size_t text_end(Text*, size_t pos);
+
size_t text_char_next(Text*, size_t pos);
size_t text_char_prev(Text*, size_t pos);