patch 8.0.0896: cannot close a terminal window when the job ends
Problem: Cannot automaticlaly close a terminal window when the job ends.
Solution: Add the ++close argument to :term. Add the term_finish option to
term_start(). (Yasuhiro Matsumoto, closes #1950) Also add
++open.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 5c10562..a98958b 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -8054,9 +8054,14 @@
connected to the terminal. When I/O is connected to the
terminal then the callback function for that part is not used.
- There is one extra option:
- "term_name" name to use for the buffer name, instead of
- the command name.
+ There are two extra options:
+ "term_name" name to use for the buffer name, instead
+ of the command name.
+ "term_finish" What todo when the job is finished:
+ "close": close any windows
+ "open": open window if needed
+ Note that "open" can be interruptive.
+ See |term++close| and |term++open|.
{only available when compiled with the |+terminal| feature}
term_wait({buf} [, {time}]) *term_wait()*