diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-02-17 21:34:00 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-02-18 16:50:40 +0100 |
| commit | 498723377cbf5cdb36d8b64f41b219a515a84175 (patch) | |
| tree | dbd82e2cc0fe74f7e63859735a4febd14e09cff2 /vis-core.h | |
| parent | 55e285783ef99befcc01d7ed6f5594f87d6d8f6c (diff) | |
| download | vis-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 */ |
