diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-08 23:06:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-08 23:06:46 +0200 |
commit | 82b9ca05f40a627355e7c3bcf49b1f19ffbdaf87 (patch) | |
tree | d6c186a3bc86256ba7fed6e4871d2abd3a193de9 /runtime | |
parent | 292d5699356dc4a22fcfbab92f0a558e90f7cfba (diff) | |
download | vim-82b9ca05f40a627355e7c3bcf49b1f19ffbdaf87.zip |
patch 8.0.0893: cannot get the scroll count of a terminal window
Problem: Cannot get the scroll count of a terminal window.
Solution: Add term_getscrolled().
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 6a2f8ef00..5c10562c5 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2373,6 +2373,7 @@ 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_getscrolled({buf}) Number get the scroll count of 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 @@ -2984,6 +2985,11 @@ ch_logfile({fname} [, {mode}]) *ch_logfile()* The file is flushed after every message, on Unix you can use "tail -f" to see what is going on in real time. + This function is not available in the |sandbox|. + NOTE: the channel communication is stored in the file, be + aware that this may contain confidential and privacy sensitive + information, e.g. a password you type in a terminal window. + ch_open({address} [, {options}]) *ch_open()* Open a channel to {address}. See |channel|. @@ -7948,6 +7954,18 @@ term_getline({buf}, {row}) *term_getline()* returned. {only available when compiled with the |+terminal| feature} +term_getscrolled({buf}) *term_getscrolled()* + Return the number of lines that scrolled to above the top of + terminal {buf}. This is the offset between the row number + used for |term_getline()| and |getline()|, so that: > + term_getline(buf, N) +< is equal to: > + `getline(N + term_getscrolled(buf)) +< (if that line exists). + + {buf} is used as with |term_getsize()|. + {only available when compiled with the |+terminal| feature} + term_getsize({buf}) *term_getsize()* Get the size of terminal {buf}. Returns a list with two numbers: [rows, cols]. This is the size of the terminal, not |