patch 8.0.0817: cannot get the terminal line at the cursor
Problem: Cannot get the line of a terminal window at the cursor.
Solution: Make the row argunt optionsl. (Yasuhiro Matsumoto, closes #1898)
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 9d26f36..dee7b64 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.0. Last change: 2017 Jul 29
+*eval.txt* For Vim version 8.0. Last change: 2017 Jul 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2371,10 +2371,10 @@
tempname() String name for a temporary file
term_getattr({attr}, {what} Number get the value of attribute {what}
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_getline({buf}[, {row}]) String get a line of text from a terminal
term_getsize({buf}) List get the size of a terminal
term_list() List get the list of terminal buffers
-term_scrape({buf}, {row}) List get row of a terminal screen
+term_scrape({buf}[, {row}]) List get row of a terminal screen
term_sendkeys({buf}, {keys}) none send keystrokes to a terminal
term_start({cmd}, {options}) Job open a terminal window and run a job
term_wait({buf}) Number wait for screen to be updated
@@ -7914,12 +7914,13 @@
Get the Job associated with terminal window {buf}.
{buf} is used as with |term_getsize()|.
-term_getline({buf}, {row}) *term_getline()*
+term_getline({buf} [, {row}]) *term_getline()*
Get a line of text from the terminal window of {buf}.
{buf} is used as with |term_getsize()|.
The first line has {row} zero. When {row} is invalid an empty
- string is returned.
+ string is returned. When {row} is omitted, the cursor line is
+ used.
term_getsize({buf}) *term_getsize()*
Get the size of terminal {buf}. Returns a list with two
@@ -7930,17 +7931,17 @@
buffer does not exist or is not a terminal window, an empty
list is returned.
-term_list(}) *term_list()*
+term_list() *term_list()*
Return a list with the buffer numbers of all buffers for
terminal windows.
-term_scrape({buf}, {row}) *term_scrape()*
+term_scrape({buf} [, {row}]) *term_scrape()*
Get the contents of {row} of terminal screen of {buf}.
For {buf} see |term_getsize()|.
The first {row} is zero. When {row} is invalid an empty list
- is returned.
-
+ is returned. When {row} is omitted the cursor line is used.
+
Return a List containing a Dict for each screen cell:
"chars" character(s) at the cell
"fg" foreground color as #rrggbb