diff runtime/doc/eval.txt @ 11876:3704ca24c9a2 v8.0.0818

patch 8.0.0818: cannot get the cursor position of a terminal commit https://github.com/vim/vim/commit/97870002d30a9846374d1ff7d73fbef351046f20 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 30 18:28:38 2017 +0200 patch 8.0.0818: cannot get the cursor position of a terminal Problem: Cannot get the cursor position of a terminal. Solution: Add term_getcursor().
author Christian Brabandt <cb@256bit.org>
date Sun, 30 Jul 2017 18:30:05 +0200
parents d444e087b8fd
children 69e7379f46db
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2370,6 +2370,7 @@ tan({expr})			Float	tangent of {expr}
 tanh({expr})			Float	hyperbolic tangent of {expr}
 tempname()			String	name for a temporary file
 term_getattr({attr}, {what}	Number	get the value of attribute {what}
+term_getcursor({buf})		List	get the cursor position of a terminal
 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
@@ -7910,6 +7911,19 @@ term_getattr({attr}, {what})				*term_ge
 			strike
 			reverse
 
+term_getcursor({buf})					*term_getcursor()*
+		Get the cusor position of terminal {buf}. Returns a list with
+		three numbers: [rows, cols, visible].  "rows" and "cols" are
+		zero based.  "visible" is one when the cursor is visible, zero
+		when it is hidden.
+		
+		This is the cursor position of the terminal itself, not of the
+		Vim window.
+
+		{buf} must be the buffer number of a terminal window. If the
+		buffer does not exist or is not a terminal window, an empty
+		list is returned.
+
 term_getjob({buf})					*term_getjob()*
 		Get the Job associated with terminal window {buf}.
 		{buf} is used as with |term_getsize()|.