diff runtime/doc/eval.txt @ 11882:69e7379f46db v8.0.0821

patch 8.0.0821: cannot get the title and status of a terminal window commit https://github.com/vim/vim/commit/b000e328efcf859d14454ffd241d44f6d14f300b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 30 19:38:21 2017 +0200 patch 8.0.0821: cannot get the title and status of a terminal window Problem: Cannot get the title and status of a terminal window. Solution: Implement term_gettitle() and term_getstatus().
author Christian Brabandt <cb@256bit.org>
date Sun, 30 Jul 2017 19:45:03 +0200
parents 3704ca24c9a2
children 40322e8f07e7
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2374,6 +2374,8 @@ term_getcursor({buf})		List	get the curs
 term_getjob({buf})		Job	get the job associated with a terminal
 term_getline({buf}[, {row}])	String	get a line of text from a terminal
 term_getsize({buf})		List	get the size of a terminal
+term_getstatus({buf})		String	get the status of a terminal
+term_gettitle({buf})		String	get the title of a terminal
 term_list()			List	get the list of terminal buffers
 term_scrape({buf}[, {row}])	List	get row of a terminal screen
 term_sendkeys({buf}, {keys})	none	send keystrokes to a terminal
@@ -7945,6 +7947,26 @@ term_getsize({buf})					*term_getsize()*
 		buffer does not exist or is not a terminal window, an empty
 		list is returned.
 
+term_getstatus({buf})					*term_getstatus()*
+		Get the status of terminal {buf}. This returns a comma
+		separated list of these items:
+			running		job is running
+			finished	job has finished
+			terminal	in Terminal-Normal mode
+		One of "running" or "finished" is always present.
+
+		{buf} must be the buffer number of a terminal window. If the
+		buffer does not exist or is not a terminal window, an empty
+		string is returned.
+
+term_gettitle({buf})					*term_gettitle()*
+		Get the title of terminal {buf}. This is the title that the
+		job in the terminal has set.
+
+		{buf} must be the buffer number of a terminal window. If the
+		buffer does not exist or is not a terminal window, an empty
+		string is returned.
+
 term_list()						*term_list()*
 		Return a list with the buffer numbers of all buffers for
 		terminal windows.