aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/channel.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-06-29 21:03:38 +0200
committerGitHub <noreply@github.com>2019-06-29 21:03:38 +0200
commit2d4a37ebab354afb94dfe600b302d8a2b1f2d889 (patch)
treefb6c12cef807625b9008487389c3eefd42a8b6af /src/nvim/channel.c
parentc207095445286321cbb319ab1498c34b204760cf (diff)
downloadrneovim-2d4a37ebab354afb94dfe600b302d8a2b1f2d889.tar.gz
rneovim-2d4a37ebab354afb94dfe600b302d8a2b1f2d889.tar.bz2
rneovim-2d4a37ebab354afb94dfe600b302d8a2b1f2d889.zip
:ls : show "R", "F" for terminal-jobs #10370
This matches Vim behavior. From `:help :ls` : R a terminal buffer with a running job F a terminal buffer with a finished job ? a terminal buffer without a job: `:terminal NONE` TODO: implement `:terminal NONE`. ref #10349
Diffstat (limited to 'src/nvim/channel.c')
-rw-r--r--src/nvim/channel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/channel.c b/src/nvim/channel.c
index 3a45a8aec7..104c79efd9 100644
--- a/src/nvim/channel.c
+++ b/src/nvim/channel.c
@@ -762,6 +762,14 @@ static void set_info_event(void **argv)
channel_decref(chan);
}
+bool channel_job_running(uint64_t id)
+{
+ Channel *chan = find_channel(id);
+ return (chan
+ && chan->streamtype == kChannelStreamProc
+ && !process_is_stopped(&chan->stream.proc));
+}
+
Dictionary channel_info(uint64_t id)
{
Channel *chan = find_channel(id);