From 498723377cbf5cdb36d8b64f41b219a515a84175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 17 Feb 2016 21:34:00 +0100 Subject: Add infrastructure to register custom text object functions --- vis-core.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vis-core.h') 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 */ -- cgit v1.2.3