diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2018-02-27 16:17:55 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2018-02-27 18:57:40 +0100 |
| commit | 0a3a82cd7d90abd206ce2cf9151d3cbed01a20af (patch) | |
| tree | d8cddd0bc0389bec1a602b6eed83ee53da144b71 /text-objects.c | |
| parent | c0832d6fc7eace1c6da9867d8b327bf62c968098 (diff) | |
| download | vis-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.c | 6 |
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; |
