aboutsummaryrefslogtreecommitdiff
path: root/vis.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-09-03 21:35:16 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-09-03 21:35:16 +0200
commit2deb344c3122e91a745734ce77b3e0967f169c2a (patch)
treea01b11949d741cb85219b99176ee0090f8e6817d /vis.h
parent87ffbb9c0ab201efc3e729876455bc4ca9921124 (diff)
downloadvis-2deb344c3122e91a745734ce77b3e0967f169c2a.tar.gz
vis-2deb344c3122e91a745734ce77b3e0967f169c2a.tar.xz
Rudimentary support for copy / paste via registers
Diffstat (limited to 'vis.h')
-rw-r--r--vis.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/vis.h b/vis.h
index ea77a65..9c88c4e 100644
--- a/vis.h
+++ b/vis.h
@@ -22,11 +22,22 @@ struct VisWin {
typedef void (*vis_statusbar_t)(WINDOW *win, bool active, const char *filename, size_t line, size_t col);
+enum Reg {
+ REG_a,
+ REG_b,
+ REG_c,
+ // ...
+ REG_z,
+ REG_DEFAULT,
+ REG_LAST,
+};
+
struct Vis {
int width, height; /* terminal size, available for all windows */
VisWin *windows; /* list of windows */
VisWin *win; /* currently active window */
Syntax *syntaxes; /* NULL terminated array of syntax definitions */
+ Register registers[REG_LAST];
void (*windows_arrange)(Vis*); /* current layout which places the windows */
vis_statusbar_t statusbar; /* configurable user hook to draw statusbar */
};
@@ -74,7 +85,10 @@ typedef struct {
size_t pos;
} OperatorContext;
-typedef void (Operator)(OperatorContext*);
+typedef struct {
+ void (*func)(OperatorContext*); /* function implementing the operator logic */
+ bool selfcontained; /* is this operator followed by movements/text-objects */
+} Operator;
typedef struct {
size_t (*win)(Win*);