1- *builtin.txt* For Vim version 9.0. Last change: 2022 Oct 21
1+ *builtin.txt* For Vim version 9.0. Last change: 2022 Nov 09
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -808,8 +808,10 @@ append({lnum}, {text}) *append()*
808808 {lnum} can be zero to insert a line before the first one.
809809 {lnum} is used like with | getline() | .
810810 Returns 1 for failure ({lnum} out of range or out of memory),
811- 0 for success. In | Vim9 | script an invalid argument or
812- negative number results in an error. Example: >
811+ 0 for success. When {text} is an empty list zero is returned,
812+ no matter the value of {lnum} .
813+ In | Vim9 | script an invalid argument or negative number
814+ results in an error. Example: >
813815 :let failed = append(line('$'), "# THE END")
814816 :let failed = append(0, ["Chapter 1", "the beginning"])
815817
@@ -837,7 +839,9 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()*
837839 If {buf} is not a valid buffer or {lnum} is not valid, an
838840 error message is given. Example: >
839841 :let failed = appendbufline(13, 0, "# THE START")
840- <
842+ < However, when {text} is an empty list then no error is given
843+ for an invalid {lnum} , since {lnum} isn't actually used.
844+
841845 Can also be used as a | method | after a List, the base is
842846 passed as the second argument: >
843847 mylist->appendbufline(buf, lnum)
@@ -983,7 +987,7 @@ autocmd_add({acmds}) *autocmd_add()*
983987 let acmd.bufnr = 5
984988 let acmd.cmd = 'call BufEnterFunc()'
985989 call autocmd_add([acmd])
986-
990+ <
987991 Can also be used as a | method | : >
988992 GetAutocmdList()->autocmd_add()
989993<
@@ -1319,7 +1323,8 @@ bufwinid({buf}) *bufwinid()*
13191323
13201324 echo "A window containing buffer 1 is " .. (bufwinid(1))
13211325<
1322- Only deals with the current tab page.
1326+ Only deals with the current tab page. See | win_findbuf() | for
1327+ finding more.
13231328
13241329 Can also be used as a | method | : >
13251330 FindBuffer()->bufwinid()
@@ -1587,7 +1592,7 @@ col({expr}) The result is a Number, which is the byte index of the column
15871592 column is one higher if the cursor is after the end of the
15881593 line. Also, when using a <Cmd> mapping the cursor isn't
15891594 moved, this can be used to obtain the column in Insert mode: >
1590- :imap <F2> <Cmd>echo col(".")<CR>
1595+ :imap <F2> <Cmd>echowin col(".")<CR>
15911596
15921597< Can also be used as a | method | : >
15931598 GetPos()->col()
@@ -2771,7 +2776,7 @@ flattennew({list} [, {maxdepth}]) *flattennew()*
27712776float2nr({expr} ) *float2nr()*
27722777 Convert {expr} to a Number by omitting the part after the
27732778 decimal point.
2774- {expr} must evaluate to a | Float | or a Number.
2779+ {expr} must evaluate to a | Float | or a | Number | .
27752780 Returns 0 if {expr} is not a | Float | or a | Number | .
27762781 When the value of {expr} is out of range for a | Number | the
27772782 result is truncated to 0x7fffffff or -0x7fffffff (or when
@@ -7875,9 +7880,10 @@ setbufline({buf}, {lnum}, {text}) *setbufline()*
78757880 To insert lines use | appendbufline() | .
78767881 Any text properties in {lnum} are cleared.
78777882
7878- {text} can be a string to set one line, or a list of strings
7879- to set multiple lines. If the list extends below the last
7880- line then those lines are added.
7883+ {text} can be a string to set one line, or a List of strings
7884+ to set multiple lines. If the List extends below the last
7885+ line then those lines are added. If the List is empty then
7886+ nothing is changed and zero is returned.
78817887
78827888 For the use of {buf} , see | bufname() | above.
78837889
@@ -8062,7 +8068,8 @@ setline({lnum}, {text}) *setline()*
80628068 When {lnum} is just below the last line the {text} will be
80638069 added below the last line.
80648070 {text} can be any type or a List of any type, each item is
8065- converted to a String.
8071+ converted to a String. When {text} is an empty List then
8072+ nothing is changed and FALSE is returned.
80668073
80678074 If this succeeds, FALSE is returned. If this fails (most likely
80688075 because {lnum} is invalid) TRUE is returned.
@@ -10222,6 +10229,7 @@ win_move_separator({nr}, {offset}) *win_move_separator()*
1022210229 FALSE otherwise.
1022310230 This will fail for the rightmost window and a full-width
1022410231 window, since it has no separator on the right.
10232+ Only works for the current tab page. *E1308*
1022510233
1022610234 Can also be used as a | method | : >
1022710235 GetWinnr()->win_move_separator(offset)
@@ -10236,6 +10244,7 @@ win_move_statusline({nr}, {offset}) *win_move_statusline()*
1023610244 movement may be smaller than specified (e.g., as a consequence
1023710245 of maintaining 'winminheight' ). Returns TRUE if the window can
1023810246 be found and FALSE otherwise.
10247+ Only works for the current tab page.
1023910248
1024010249 Can also be used as a | method | : >
1024110250 GetWinnr()->win_move_statusline(offset)
0 commit comments