aboutsummaryrefslogtreecommitdiff
path: root/text-objects.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2018-02-27 16:17:55 +0100
committerMarc André Tanner <mat@brain-dump.org>2018-02-27 18:57:40 +0100
commit0a3a82cd7d90abd206ce2cf9151d3cbed01a20af (patch)
treed8cddd0bc0389bec1a602b6eed83ee53da144b71 /text-objects.c
parentc0832d6fc7eace1c6da9867d8b327bf62c968098 (diff)
downloadvis-0a3a82cd7d90abd206ce2cf9151d3cbed01a20af.tar.gz
vis-0a3a82cd7d90abd206ce2cf9151d3cbed01a20af.tar.xz
vis: implement normal/outer paragraph text object
Diffstat (limited to 'text-objects.c')
-rw-r--r--text-objects.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/text-objects.c b/text-objects.c
index 27553b8..1f44222 100644
--- a/text-objects.c
+++ b/text-objects.c
@@ -205,6 +205,12 @@ Filerange text_object_paragraph(Text *txt, size_t pos) {
return r;
}
+Filerange text_object_paragraph_outer(Text *txt, size_t pos) {
+ Filerange p1 = text_object_paragraph(txt, pos);
+ Filerange p2 = text_object_paragraph(txt, p1.end);
+ return text_range_union(&p1, &p2);
+}
+
static Filerange text_object_bracket(Text *txt, size_t pos, char type) {
char c, open, close;
int opened = 1, closed = 1;