diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-02-11 10:03:14 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-02-11 10:03:14 +0100 |
| commit | 979d51bcb65ccceec95f34a10fdf6446ac97473c (patch) | |
| tree | d06e2b6ed680a5f5a8279afc5fde58dc5a9f7037 /vis-core.h | |
| parent | 534000b7831a6b536353053e47d582cf6c7f3053 (diff) | |
| download | vis-979d51bcb65ccceec95f34a10fdf6446ac97473c.tar.gz vis-979d51bcb65ccceec95f34a10fdf6446ac97473c.tar.xz | |
vis: add support for different kind of text objects
Up until now text objects would only ever grow/expand if
applied multiple times. The new SPLIT type allows text
objects which cover a completely different range when
applied with a count.
Diffstat (limited to 'vis-core.h')
| -rw-r--r-- | vis-core.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -70,10 +70,12 @@ typedef struct { /* Motion implementation, takes a cursor postion and returns a typedef struct { /* gets a cursor position and returns a file range (or text_range_empty()) * representing the text object containing the position. */ - Filerange (*range)(Text*, size_t pos); - enum { /* whether the object should include the delimiting symbols or not */ - INNER, - OUTER, + Filerange (*txt)(Text*, size_t pos); + Filerange (*vis)(Vis*, Text*, size_t pos); + enum { + INNER = 1 << 0, /* whether the object should include */ + OUTER = 1 << 1, /* the delimiting symbols or not */ + SPLIT = 1 << 2, /* whether multiple applications will yield a split range */ } type; } TextObject; |
