From 99601627e5e0b202c55a7807a72958305ceb96eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 12 Aug 2015 19:08:40 +0200 Subject: vis: refactor operator implementation Pass editor instance and text to operate on as parameter instead of using global state. --- editor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'editor.h') diff --git a/editor.h b/editor.h index 3454bd4..26f07e8 100644 --- a/editor.h +++ b/editor.h @@ -7,6 +7,7 @@ #include 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 { -- cgit v1.2.3