aboutsummaryrefslogtreecommitdiff
path: root/vis-core.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-02-17 21:34:00 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-02-18 16:50:40 +0100
commit498723377cbf5cdb36d8b64f41b219a515a84175 (patch)
treedbd82e2cc0fe74f7e63859735a4febd14e09cff2 /vis-core.h
parent55e285783ef99befcc01d7ed6f5594f87d6d8f6c (diff)
downloadvis-498723377cbf5cdb36d8b64f41b219a515a84175.tar.gz
vis-498723377cbf5cdb36d8b64f41b219a515a84175.tar.xz
Add infrastructure to register custom text object functions
Diffstat (limited to 'vis-core.h')
-rw-r--r--vis-core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/vis-core.h b/vis-core.h
index b1330c7..15b4167 100644
--- a/vis-core.h
+++ b/vis-core.h
@@ -76,11 +76,13 @@ typedef struct {
* representing the text object containing the position. */
Filerange (*txt)(Text*, size_t pos);
Filerange (*vis)(Vis*, Text*, size_t pos);
+ Filerange (*user)(Vis*, Win*, void *data, 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;
+ void *data;
} TextObject;
/* a macro is just a sequence of symbolic keys as received from ui->getkey */
@@ -169,6 +171,7 @@ struct Vis {
lua_State *lua; /* lua context used for syntax highligthing */
VisEvent *event;
Array motions;
+ Array textobjects;
};
/** stuff used by multiple of the vis-* files */