diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-04-18 15:52:52 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-18 15:52:52 +0200 |
| commit | ef5c9d41e86a2c8af909308355518635a6007d56 (patch) | |
| tree | 13f0d01e4484534ec81bbf026fca7a0f3768e32e /vis.c | |
| parent | 7eca0d08630e01f58fb2e5928442b0bdd0146777 (diff) | |
| download | vis-ef5c9d41e86a2c8af909308355518635a6007d56.tar.gz vis-ef5c9d41e86a2c8af909308355518635a6007d56.tar.xz | |
vis: do not run event handlers for internal files
Should have been part of f50465312dbb7e8fcb2409aa691d1aea7a43c466.
Diffstat (limited to 'vis.c')
| -rw-r--r-- | vis.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -44,7 +44,7 @@ static void file_free(Vis *vis, File *file) { --file->refcount; return; } - if (vis->event && vis->event->file_close) + if (!file->internal && vis->event && vis->event->file_close) vis->event->file_close(vis, file); text_free(file->text); free((char*)file->name); @@ -96,7 +96,7 @@ static File *file_new(Vis *vis, const char *filename) { if (filename) file->name = strdup(filename); - if (vis->event && vis->event->file_open) + if (!file->internal && vis->event && vis->event->file_open) vis->event->file_open(vis, file); return file; } @@ -323,7 +323,7 @@ void vis_window_swap(Win *a, Win *b) { void vis_window_close(Win *win) { Vis *vis = win->vis; - if (vis->event && vis->event->win_close) + if (!win->file->internal && vis->event && vis->event->win_close) vis->event->win_close(vis, win); file_free(vis, win->file); if (win->prev) |
