From 3c081d028062f793b63b8689f854bbea30e15752 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Sat, 28 Aug 2021 09:58:27 -0600 Subject: fix(jobwait): always drain process event queues #15402 Problem: jobwait() returns early if the job was stopped, but the job might have pending callbacks on its event queue which are required to complete its teardown. State such as term->closed might not be updated yet (by the pending callbacks), so codepaths such as :bdelete think the job is still running. Solution: Always flush the job's event queue before returning from jobwait(). ref #15349 --- runtime/doc/nvim_terminal_emulator.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index e0589ba7b8..0bf58f85fc 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -13,7 +13,7 @@ from the connected program. Terminal buffers behave like normal buffers, except: - With 'modifiable', lines can be edited but not deleted. - 'scrollback' controls how many lines are kept. -- Output is followed if the cursor is on the last line. +- Output is followed ("tailed") if cursor is on the last line. - 'modified' is the default. You can set 'nomodified' to avoid a warning when closing the terminal buffer. - 'bufhidden' defaults to "hide". -- cgit