summaryrefslogtreecommitdiffstats
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-27 14:50:47 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-27 14:50:47 +0200
commit4ab7968aa9d8a624cd56f55b5cad2bedb240eb73 (patch)
treeba518cce64059e79a13941a0fb0ac799c5d60534 /src/channel.c
parent8d9f0ef5c6a6f6d19c3d02690e1ee347a70b8452 (diff)
patch 8.0.1005: terminal without job updates slowly in GUIv8.0.1005
Problem: Terminal without job updates slowly in GUI. Solution: Poll for input when a channel has the keep_open flag.
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c
index 508fb0c0f3..b7a268a79a 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -3555,6 +3555,22 @@ channel_handle_events(int only_keep_open)
}
# endif
+# if defined(FEAT_GUI) || defined(PROTO)
+/*
+ * Return TRUE when there is any channel with a keep_open flag.
+ */
+ int
+channel_any_keep_open()
+{
+ channel_T *channel;
+
+ for (channel = first_channel; channel != NULL; channel = channel->ch_next)
+ if (channel->ch_keep_open)
+ return TRUE;
+ return FALSE;
+}
+# endif
+
/*
* Set "channel"/"part" to non-blocking.
* Only works for sockets and pipes.