aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-11-28 18:45:07 +0100
committerMarc André Tanner <mat@brain-dump.org>2015-11-28 20:09:15 +0100
commitb1c462beb8b9e0bae7f8886054eee2fe361149a8 (patch)
tree8fc350e8d1bde3b3bc530969bfaa24e485ab87a9 /view.c
parent30e9673fdb22905df853ef07b3826fa19b28831c (diff)
downloadvis-b1c462beb8b9e0bae7f8886054eee2fe361149a8.tar.gz
vis-b1c462beb8b9e0bae7f8886054eee2fe361149a8.tar.xz
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.
Diffstat (limited to 'view.c')
-rw-r--r--view.c7
1 files changed, 1 insertions, 6 deletions
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);