aboutsummaryrefslogtreecommitdiff
path: root/text-motions.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-07-27 15:09:28 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-07-28 13:21:50 +0200
commitc6031d7f1f3278979c9f5c9f4802b4e1f1cbd683 (patch)
tree8997214f3e8a5249452b41c4bebd8aed03dce4bf /text-motions.h
parente15edaaa06b9a08aa4131588da6aa9adca610ea6 (diff)
downloadvis-c6031d7f1f3278979c9f5c9f4802b4e1f1cbd683.tar.gz
vis-c6031d7f1f3278979c9f5c9f4802b4e1f1cbd683.tar.xz
text-motion: add functions to iterate over lines of a range
Diffstat (limited to 'text-motions.h')
-rw-r--r--text-motions.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/text-motions.h b/text-motions.h
index 438a42f..72878cd 100644
--- a/text-motions.h
+++ b/text-motions.h
@@ -42,6 +42,11 @@ size_t text_line_char_prev(Text*, size_t pos);
/* move to same offset in previous/next line */
size_t text_line_up(Text*, size_t pos);
size_t text_line_down(Text*, size_t pos);
+/* functions to iterate over all line beginnings in a given range */
+size_t text_range_line_first(Text*, Filerange*);
+size_t text_range_line_last(Text*, Filerange*);
+size_t text_range_line_next(Text*, Filerange*, size_t pos);
+size_t text_range_line_prev(Text*, Filerange*, size_t pos);
/*
* A longword consists of a sequence of non-blank characters, separated with
* white space. TODO?: An empty line is also considered to be a word.