aboutsummaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-08-12 19:08:40 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-10-22 19:45:47 +0200
commit99601627e5e0b202c55a7807a72958305ceb96eb (patch)
tree2d1d2c609a01dc81fac0ae6c58d70997913098cd /editor.h
parenteb906b393d5b2cadefeaa3f09ec40b408d24af53 (diff)
downloadvis-99601627e5e0b202c55a7807a72958305ceb96eb.tar.gz
vis-99601627e5e0b202c55a7807a72958305ceb96eb.tar.xz
vis: refactor operator implementation
Pass editor instance and text to operate on as parameter instead of using global state.
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor.h b/editor.h
index 3454bd4..26f07e8 100644
--- a/editor.h
+++ b/editor.h
@@ -7,6 +7,7 @@
#include <setjmp.h>
typedef struct Editor Editor;
+typedef Editor Vis;
typedef struct File File;
typedef struct Win Win;
@@ -77,7 +78,7 @@ typedef struct {
} OperatorContext;
typedef struct {
- size_t (*func)(OperatorContext*); /* operator logic, returns new cursor position */
+ size_t (*func)(Vis*, Text*, OperatorContext*); /* operator logic, returns new cursor position */
} Operator;
typedef struct {