aboutsummaryrefslogtreecommitdiff
path: root/sam.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-11-14 22:53:07 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-11-15 12:56:56 +0100
commitd770aa314255313e97b3ecb4c0cafde0fca16c9d (patch)
tree71424a8d671641202d72dbfeb4aa1b05a205ed64 /sam.c
parent1c56750f7b6796e850a9299358dc6a187c6278bf (diff)
downloadvis-d770aa314255313e97b3ecb4c0cafde0fca16c9d.tar.gz
vis-d770aa314255313e97b3ecb4c0cafde0fca16c9d.tar.xz
vis: overhaul and unify event generation code
Add another layer of indirection, move actual event generation code to a dedicated function.
Diffstat (limited to 'sam.c')
-rw-r--r--sam.c3
1 files changed, 1 insertions, 2 deletions
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;
}