Mercurial > vim
diff runtime/doc/eval.txt @ 18170:4ac8161e92e0 v8.1.2080
patch 8.1.2080: the terminal API is limited and can't be disabled
Commit: https://github.com/vim/vim/commit/d2842ea60bd608b7f9ec93c77d3f36a8e3bf5fe9
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 26 23:08:54 2019 +0200
patch 8.1.2080: the terminal API is limited and can't be disabled
Problem: The terminal API is limited and can't be disabled.
Solution: Add term_setapi() to set the function prefix. (Ozaki Kiichi,
closes #2907)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 26 Sep 2019 23:15:05 +0200 |
parents | 1e5672da6a69 |
children | 03b854983b14 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.1. Last change: 2019 Sep 19 +*eval.txt* For Vim version 8.1. Last change: 2019 Sep 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2819,6 +2819,7 @@ term_gettty({buf}, [{input}]) String get 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 +term_setapi({buf}, {expr}) none set |terminal-api| function name prefix term_setansicolors({buf}, {colors}) none set ANSI palette in GUI color mode term_setkill({buf}, {how}) none set signal to stop job in terminal @@ -3262,9 +3263,14 @@ bufnr([{expr} [, {create}]]) The result is the number of a buffer, as it is displayed by the ":ls" command. For the use of {expr}, see |bufname()| above. + If the buffer doesn't exist, -1 is returned. Or, if the {create} argument is present and not zero, a new, unlisted, - buffer is created and its number is returned. + buffer is created and its number is returned. Example: > + let newbuf = bufnr('Scratch001', 1) +< Using an empty name uses the current buffer. To create a new + buffer with an empty name use |bufadd()|. + bufnr("$") is the last buffer: > :let last_buffer = bufnr("$") < The result is a Number, which is the highest buffer number