aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vis.c b/vis.c
index d374d39..739e5c6 100644
--- a/vis.c
+++ b/vis.c
@@ -28,6 +28,7 @@
#include "vis-core.h"
#include "sam.h"
#include "ui.h"
+#include "vis-subprocess.h"
static void macro_replay(Vis *vis, const Macro *macro);
@@ -1437,7 +1438,8 @@ int vis_run(Vis *vis) {
vis_update(vis);
idle.tv_sec = vis->mode->idle_timeout;
- int r = pselect(1, &fds, NULL, NULL, timeout, &emptyset);
+ int r = pselect(vis_process_before_tick(&fds) + 1, &fds, NULL, NULL,
+ timeout, &emptyset);
if (r == -1 && errno == EINTR)
continue;
@@ -1445,6 +1447,7 @@ int vis_run(Vis *vis) {
/* TODO save all pending changes to a ~suffixed file */
vis_die(vis, "Error in mainloop: %s\n", strerror(errno));
}
+ vis_process_tick(vis, &fds);
if (!FD_ISSET(STDIN_FILENO, &fds)) {
if (vis->mode->idle)