diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-11-21 14:51:13 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-11-21 14:51:13 +0000 |
commit | eea32afdb83ae281a63152f7494f79ec7e45ff55 (patch) | |
tree | 78938a8c7f2d263f1d66a3c6293ea4c9af8ef3a0 /src/channel.c | |
parent | 7f0c4b418e01d6e056a74de2f22fcbad613b7591 (diff) | |
download | vim-git-eea32afdb83ae281a63152f7494f79ec7e45ff55.tar.gz |
patch 8.2.3640: freeze when calling term_wait() in a close callbackv8.2.3640
Problem: Freeze when calling term_wait() in a close callback.
Solution: Set a "closing" flag to tell term_wait() to return. (closes #9152)
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c index b46205e67..7514d6385 100644 --- a/src/channel.c +++ b/src/channel.c @@ -3156,6 +3156,10 @@ channel_close(channel_T *channel, int invoke_close_cb) { ch_part_T part; +#ifdef FEAT_TERMINAL + // let the terminal know it is closing to avoid getting stuck + term_channel_closing(channel); +#endif // Invoke callbacks and flush buffers before the close callback. if (channel->ch_close_cb.cb_name != NULL) ch_log(channel, |