From b1c462beb8b9e0bae7f8886054eee2fe361149a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 28 Nov 2015 18:45:07 +0100 Subject: view: remove ViewEvent infrastructure The only used event handler was used to update the '< and '> marks which is now taken care of by the leave handler of the visual modes. --- view.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'view.c') diff --git a/view.c b/view.c index dfb4c57..4e3f869 100644 --- a/view.c +++ b/view.c @@ -67,7 +67,6 @@ struct Cursor { /* cursor position */ struct View { Text *text; /* underlying text management */ UiWin *ui; - ViewEvent *events; int width, height; /* size of display area */ Filepos start, end; /* currently displayed area [start, end] in bytes from the start of the file */ Filepos start_last; /* previously used start of visible area, used to update the mark */ @@ -580,9 +579,6 @@ void view_update(View *view) { } } } - - if (view->events && view->events->selection) - view->events->selection(view->events->data, &sel); } } @@ -637,7 +633,7 @@ void view_reload(View *view, Text *text) { view_cursor_to(view, 0); } -View *view_new(Text *text, lua_State *lua, ViewEvent *events) { +View *view_new(Text *text, lua_State *lua) { if (!text) return NULL; View *view = calloc(1, sizeof(View)); @@ -650,7 +646,6 @@ View *view_new(Text *text, lua_State *lua, ViewEvent *events) { view->text = text; view->lua = lua; - view->events = events; view->tabwidth = 8; view_options_set(view, 0); -- cgit v1.2.3