From 9358979d096a6bfde371bbca5c77f8d45a4de253 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 22 Aug 2019 22:39:28 -0400 Subject: vim-patch:8.1.0037: cannot easily append lines to another buffer Problem: Cannot easily append lines to another buffer. Solution: Add appendbufline(). https://github.com/vim/vim/commit/ca851593a660f08aba5c134f90c238d4a3e983e6 --- runtime/doc/eval.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 5e8c5151f2..0418ab950c 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2495,6 +2495,21 @@ append({lnum}, {text}) *append()* 0 for success. Example: > :let failed = append(line('$'), "# THE END") :let failed = append(0, ["Chapter 1", "the beginning"]) + +appendbufline({expr}, {lnum}, {text}) *appendbufline()* + Like |append()| but append the text in buffer {expr}. + + For the use of {expr}, see |bufname()|. + + {lnum} is used like with |append()|. Note that using |line()| + would use the current buffer, not the one appending to. + Use "$" to append at the end of the buffer. + + On success 0 is returned, on failure 1 is returned. + + If {expr} is not a valid buffer or {lnum} is not valid, an + error message is given. Example: > + :let failed = appendbufline(13, 0, "# THE START") < *argc()* argc([{winid}]) -- cgit From c58054c231f11cfd911795b572029e9360835bbb Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 23 Aug 2019 07:24:02 -0400 Subject: vim-patch:8.0.1386: cannot select modified buffers with getbufinfo() Problem: Cannot select modified buffers with getbufinfo(). Solution: Add the "bufmodified" flag. (Yegappan Lakshmanan, closes vim/vim#2431) https://github.com/vim/vim/commit/8e6a31df81113bbf0e4bb5324a74dc5f6c62a490 --- runtime/doc/eval.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 0418ab950c..8c3399fd0d 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4041,6 +4041,7 @@ getbufinfo([{dict}]) be specified in {dict}: buflisted include only listed buffers. bufloaded include only loaded buffers. + bufmodified include only modified buffers. Otherwise, {expr} specifies a particular buffer to return information for. For the use of {expr}, see |bufname()| -- cgit From 2a1887c2df27c5f91f0f2f6ad6c70da60239cfce Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 23 Aug 2019 07:31:39 -0400 Subject: vim-patch:8.1.0187: getwininfo() and win_screenpos() return different numbers Problem: getwininfo() and win_screenpos() return different numbers. Solution: Add one to "wincol" and "winrow" from getwininfo(). https://github.com/vim/vim/commit/7132ddc1014a4e1230f0080e418221e5843e1277 --- runtime/doc/eval.txt | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 8c3399fd0d..de2650baa4 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4741,25 +4741,6 @@ gettagstack([{nr}]) *gettagstack()* See |tagstack| for more information about the tag stack. -getwinpos([{timeout}]) *getwinpos()* - The result is a list with two numbers, the result of - getwinposx() and getwinposy() combined: - [x-pos, y-pos] - {timeout} can be used to specify how long to wait in msec for - a response from the terminal. When omitted 100 msec is used. - - *getwinposx()* -getwinposx() The result is a Number, which is the X coordinate in pixels of - the left hand side of the GUI Vim window. The result will be - -1 if the information is not available. - The value can be used with `:winpos`. - - *getwinposy()* -getwinposy() The result is a Number, which is the Y coordinate in pixels of - the top of the GUI Vim window. The result will be -1 if the - information is not available. - The value can be used with `:winpos`. - getwininfo([{winid}]) *getwininfo()* Returns information about windows as a List with Dictionaries. @@ -4789,6 +4770,25 @@ getwininfo([{winid}]) *getwininfo()* winnr window number winrow topmost screen column of the window +getwinpos([{timeout}]) *getwinpos()* + The result is a list with two numbers, the result of + getwinposx() and getwinposy() combined: + [x-pos, y-pos] + {timeout} can be used to specify how long to wait in msec for + a response from the terminal. When omitted 100 msec is used. + + *getwinposx()* +getwinposx() The result is a Number, which is the X coordinate in pixels of + the left hand side of the GUI Vim window. The result will be + -1 if the information is not available. + The value can be used with `:winpos`. + + *getwinposy()* +getwinposy() The result is a Number, which is the Y coordinate in pixels of + the top of the GUI Vim window. The result will be -1 if the + information is not available. + The value can be used with `:winpos`. + getwinvar({winnr}, {varname} [, {def}]) *getwinvar()* Like |gettabwinvar()| for the current tabpage. Examples: > @@ -8888,7 +8888,7 @@ win_id2win({expr}) *win_id2win()* win_screenpos({nr}) *win_screenpos()* Return the screen position of window {nr} as a list with two numbers: [row, col]. The first window always has position - [1, 1]. + [1, 1], unless there is a tabline, then it is [2, 1]. {nr} can be the window number or the |window-ID|. Return [0, 0] if the window cannot be found in the current tabpage. -- cgit