From d770aa314255313e97b3ecb4c0cafde0fca16c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 14 Nov 2016 22:53:07 +0100 Subject: vis: overhaul and unify event generation code Add another layer of indirection, move actual event generation code to a dedicated function. --- sam.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sam.c') diff --git a/sam.c b/sam.c index 328cf3d..b7339fe 100644 --- a/sam.c +++ b/sam.c @@ -1232,8 +1232,7 @@ static bool cmd_write(Vis *vis, Win *win, Command *cmd, const char *argv[], Curs file_name_set(file, *name); if (strcmp(file->name, *name) == 0) file->stat = text_stat(text); - if (!file->internal && vis->event && vis->event->file_save) - vis->event->file_save(vis, file); + vis_event_emit(vis, VIS_EVENT_FILE_SAVE, file); } return true; } -- cgit v1.2.3