Skip to content

Commit b258c88

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 07ed537 + 2996773 commit b258c88

143 files changed

Lines changed: 4790 additions & 2197 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Filelist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ SRC_ALL = \
1212
.github/workflows/ci.yml \
1313
.github/workflows/codeql-analysis.yml \
1414
.github/workflows/coverity.yml \
15+
.github/dependabot.yml \
1516
.gitignore \
1617
.hgignore \
1718
.lgtm.yml \
@@ -177,6 +178,8 @@ SRC_ALL = \
177178
src/testdir/Make_all.mak \
178179
src/testdir/*.in \
179180
src/testdir/*.py \
181+
src/testdir/keycode_check.vim \
182+
src/testdir/keycode_check.json \
180183
src/testdir/lsan-suppress.txt \
181184
src/testdir/sautest/autoload/*.vim \
182185
src/testdir/testluaplugin/lua/testluaplugin/*.lua \
@@ -394,6 +397,7 @@ SRC_ALL = \
394397
src/libvterm/t/66screen_extent.test \
395398
src/libvterm/t/67screen_dbl_wh.test \
396399
src/libvterm/t/68screen_termprops.test \
400+
src/libvterm/t/69screen_reflow.test \
397401
src/libvterm/t/90vttest_01-movement-1.test \
398402
src/libvterm/t/90vttest_01-movement-2.test \
399403
src/libvterm/t/90vttest_01-movement-3.test \
@@ -641,6 +645,7 @@ SRC_MAC = \
641645
src/os_mac_conv.c \
642646
src/os_macosx.m \
643647
src/proto/os_mac_conv.pro \
648+
src/proto/os_macosx.pro \
644649

645650
# source files for VMS (in the extra archive)
646651
SRC_VMS = \

runtime/doc/autocmd.txt

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,16 +1380,32 @@ WinNew When a new window was created. Not done for
13801380

13811381
*WinScrolled*
13821382
WinScrolled After scrolling the content of a window or
1383-
resizing a window.
1384-
The pattern is matched against the
1385-
|window-ID|. Both <amatch> and <afile> are
1386-
set to the |window-ID|.
1387-
Non-recursive (the event cannot trigger
1388-
itself). However, if the command causes the
1389-
window to scroll or change size another
1383+
resizing a window in the current tab page.
1384+
1385+
When more than one window scrolled or resized
1386+
only one WinScrolled event is triggered. You
1387+
can use the `winlayout()` and `getwininfo()`
1388+
functions to see what changed.
1389+
1390+
The pattern is matched against the |window-ID|
1391+
of the first window that scrolled or resized.
1392+
Both <amatch> and <afile> are set to the
1393+
|window-ID|.
1394+
1395+
Only starts triggering after startup finished
1396+
and the first screen redraw was done.
1397+
1398+
Non-recursive: the event will not trigger
1399+
while executing commands for the WinScrolled
1400+
event. However, if the command causes a
1401+
window to scroll or change size, then another
13901402
WinScrolled event will be triggered later.
1403+
13911404
Does not trigger when the command is added,
13921405
only after the first scroll or resize.
1406+
*E1312*
1407+
It is not allowed to change the window layout
1408+
here (split, close or move windows).
13931409

13941410
==============================================================================
13951411
6. Patterns *autocmd-patterns* *{aupat}*

runtime/doc/builtin.txt

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.0. Last change: 2022 Nov 09
1+
*builtin.txt* For Vim version 9.0. Last change: 2022 Nov 14
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -116,13 +116,13 @@ ch_status({handle} [, {options}])
116116
changenr() Number current change number
117117
char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in {expr}
118118
charclass({string}) Number character class of {string}
119-
charcol({expr}) Number column number of cursor or mark
119+
charcol({expr} [, {winid}]) Number column number of cursor or mark
120120
charidx({string}, {idx} [, {countcc}])
121121
Number char index of byte {idx} in {string}
122122
chdir({dir}) String change current working directory
123123
cindent({lnum}) Number C indent for line {lnum}
124124
clearmatches([{win}]) none clear all matches
125-
col({expr}) Number column byte index of cursor or mark
125+
col({expr} [, {winid}]) Number column byte index of cursor or mark
126126
complete({startcol}, {matches}) none set Insert mode completion
127127
complete_add({expr}) Number add completion match
128128
complete_check() Number check for key typed during completion
@@ -246,6 +246,7 @@ getloclist({nr}, {what}) Dict get specific location list properties
246246
getmarklist([{buf}]) List list of global/local marks
247247
getmatches([{win}]) List list of current matches
248248
getmousepos() Dict last known mouse position
249+
getmouseshape() String current mouse shape name
249250
getpid() Number process ID of Vim
250251
getpos({expr}) List position of cursor, mark, etc.
251252
getqflist() List list of quickfix items
@@ -1476,7 +1477,7 @@ charclass({string}) *charclass()*
14761477
Returns 0 if {string} is not a |String|.
14771478

14781479

1479-
charcol({expr}) *charcol()*
1480+
charcol({expr} [, {winid}]) *charcol()*
14801481
Same as |col()| but returns the character index of the column
14811482
position given with {expr} instead of the byte position.
14821483

@@ -1559,8 +1560,8 @@ clearmatches([{win}]) *clearmatches()*
15591560
Can also be used as a |method|: >
15601561
GetWin()->clearmatches()
15611562
<
1562-
*col()*
1563-
col({expr}) The result is a Number, which is the byte index of the column
1563+
col({expr} [, {winid}) *col()*
1564+
The result is a Number, which is the byte index of the column
15641565
position given with {expr}. The accepted positions are:
15651566
. the cursor position
15661567
$ the end of the cursor line (the result is the
@@ -1575,6 +1576,8 @@ col({expr}) The result is a Number, which is the byte index of the column
15751576
and column number. Most useful when the column is "$", to get
15761577
the last column of a specific line. When "lnum" or "col" is
15771578
out of range then col() returns zero.
1579+
With the optional {winid} argument the values are obtained for
1580+
that window instead of the current window.
15781581
To get the line number use |line()|. To get both use
15791582
|getpos()|.
15801583
For the screen column position use |virtcol()|. For the
@@ -1585,7 +1588,8 @@ col({expr}) The result is a Number, which is the byte index of the column
15851588
col("$") length of cursor line plus one
15861589
col("'t") column of mark t
15871590
col("'" .. markname) column of mark markname
1588-
< The first column is 1. Returns 0 if {expr} is invalid.
1591+
< The first column is 1. Returns 0 if {expr} is invalid or when
1592+
the window with ID {winid} is not found.
15891593
For an uppercase mark the column may actually be in another
15901594
buffer.
15911595
For the cursor position, when 'virtualedit' is active, the
@@ -3878,6 +3882,12 @@ getmousepos() *getmousepos()*
38783882
When using |getchar()| the Vim variables |v:mouse_lnum|,
38793883
|v:mouse_col| and |v:mouse_winid| also provide these values.
38803884

3885+
getmouseshape() *getmouseshape()*
3886+
Returns the name of the currently showing mouse pointer.
3887+
When the |+mouseshape| feature is not supported or the shape
3888+
is unknown an empty string is returned.
3889+
This function is mainly intended for testing.
3890+
38813891
*getpid()*
38823892
getpid() Return a Number which is the process ID of the Vim process.
38833893
On Unix and MS-Windows this is a unique number, until Vim

runtime/doc/cmdline.txt

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*cmdline.txt* For Vim version 9.0. Last change: 2022 Sep 26
1+
*cmdline.txt* For Vim version 9.0. Last change: 2022 Nov 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -736,19 +736,59 @@ Line numbers may be specified with: *:range* *{address}*
736736
'T position of mark T (uppercase); when the mark is in
737737
another file it cannot be used in a range
738738
/{pattern}[/] the next line where {pattern} matches *:/*
739+
also see |:range-pattern| below
739740
?{pattern}[?] the previous line where {pattern} matches *:?*
741+
also see |:range-pattern| below
740742
\/ the next line where the previously used search
741743
pattern matches
742744
\? the previous line where the previously used search
743745
pattern matches
744746
\& the next line where the previously used substitute
745747
pattern matches
746748

749+
*:range-offset*
747750
Each may be followed (several times) by '+' or '-' and an optional number.
748751
This number is added or subtracted from the preceding line number. If the
749752
number is omitted, 1 is used. If there is nothing before the '+' or '-' then
750753
the current line is used.
751-
754+
*:range-closed-fold*
755+
When a line number after the comma is in a closed fold it is adjusted to the
756+
last line of the fold, thus the whole fold is included.
757+
758+
When a number is added this is done after the adjustment to the last line of
759+
the fold. This means these lines are additionally included in the range. For
760+
example: >
761+
:3,4+2print
762+
On this text:
763+
1 one ~
764+
2 two ~
765+
3 three ~
766+
4 four FOLDED ~
767+
5 five FOLDED ~
768+
6 six ~
769+
7 seven ~
770+
8 eight ~
771+
Where lines four and five are a closed fold, ends up printing lines 3 to 7.
772+
The 7 comes from the "4" in the range, which is adjusted to the end of the
773+
closed fold, which is 5, and then the offset 2 is added.
774+
775+
An example for subtracting (which isn't very useful): >
776+
:2,4-1print
777+
On this text:
778+
1 one ~
779+
2 two ~
780+
3 three FOLDED~
781+
4 four FOLDED ~
782+
5 five FOLDED ~
783+
6 six FOLDED ~
784+
7 seven ~
785+
8 eight ~
786+
Where lines three to six are a closed fold, ends up printing lines 2 to 6.
787+
The 6 comes from the "4" in the range, which is adjusted to the end of the
788+
closed fold, which is 6, and then 1 is subtracted, then this is still in the
789+
closed fold and the last line of that fold is used, which is 6.
790+
791+
*:range-pattern*
752792
The "/" and "?" after {pattern} are required to separate the pattern from
753793
anything that follows.
754794

runtime/doc/eval.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 9.0. Last change: 2022 Oct 07
1+
*eval.txt* For Vim version 9.0. Last change: 2022 Nov 13
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3085,6 +3085,10 @@ text...
30853085
Unlock the internal variable {name}. Does the
30863086
opposite of |:lockvar|.
30873087

3088+
If {name} does not exist:
3089+
- In |Vim9| script an error is given.
3090+
- In legacy script this is silently ignored.
3091+
30883092
:if {expr1} *:if* *:end* *:endif* *:en* *E171* *E579* *E580*
30893093
:en[dif] Execute the commands until the next matching `:else`
30903094
or `:endif` if {expr1} evaluates to non-zero.

runtime/doc/gui.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*gui.txt* For Vim version 9.0. Last change: 2022 Apr 03
1+
*gui.txt* For Vim version 9.0. Last change: 2022 Nov 17
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -894,6 +894,11 @@ s The menu was defined with "<silent>" to avoid showing what it is
894894
Note that hitting <Tab> while entering a menu name after a menu command may
895895
be used to complete the name of the menu item.
896896

897+
It is not allowed to change menus while listing them. *E1310*
898+
This doesn't normally happen, only when, for example, you would have a timer
899+
callback define a menu and the user lists menus in a way it shows
900+
|more-prompt|.
901+
897902

898903
5.4 Executing Menus *execute-menus*
899904

runtime/doc/map.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*map.txt* For Vim version 9.0. Last change: 2022 Oct 19
1+
*map.txt* For Vim version 9.0. Last change: 2022 Nov 14
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -234,6 +234,9 @@ The search string will not be echoed when using this mapping. Messages from
234234
the executed command are still given though. To shut them up too, add a
235235
":silent" in the executed command: >
236236
:map <silent> ,h :exe ":silent normal /Header\r"<CR>
237+
Note that the effect of a command might also be silenced, e.g., when the
238+
mapping selects another entry for command line completion it won't be
239+
displayed.
237240
Prompts will still be given, e.g., for inputdialog().
238241
Using "<silent>" for an abbreviation is possible, but will cause redrawing of
239242
the command line to fail.
@@ -581,6 +584,9 @@ is the start of the last selected Visual area in the current buffer |'<|.
581584
The |:filter| command can be used to select what mappings to list. The
582585
pattern is matched against the {lhs} and {rhs} in the raw form.
583586

587+
While mappings are being listed, it is not possible to add or clear mappings,
588+
e.g. from a timer callback. *E1309*
589+
584590
*:map-verbose*
585591
When 'verbose' is non-zero, listing a key map will also display where it was
586592
last defined. Example: >
@@ -1473,6 +1479,8 @@ See |:verbose-cmd| for more information.
14731479

14741480
:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
14751481
Delete the user-defined command {cmd}.
1482+
This is not allowed while listing commands, e.g. from
1483+
a timer. *E1311*
14761484

14771485
:delc[ommand] -buffer {cmd} *E1237*
14781486
Delete the user-defined command {cmd} that was defined

runtime/doc/options.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 9.0. Last change: 2022 Oct 28
1+
*options.txt* For Vim version 9.0. Last change: 2022 Nov 12
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3064,7 +3064,7 @@ A jump table for the options with a short description can be found at |Q_op|.
30643064
not set yet, the default for 'fileencodings' is changed.
30653065

30663066
*'endoffile'* *'eof'* *'noendoffile'* *'noeof'*
3067-
'endoffile' 'eof' boolean (default on)
3067+
'endoffile' 'eof' boolean (default off)
30683068
local to buffer
30693069
Indicates that a CTRL-Z character was found at the end of the file
30703070
when reading it. Normally only happens when 'fileformat' is "dos".

runtime/doc/syntax.txt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim version 9.0. Last change: 2022 Nov 06
1+
*syntax.txt* For Vim version 9.0. Last change: 2022 Nov 15
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1888,6 +1888,16 @@ following two lines to the syntax coloring file for that language
18881888
Now you just need to make sure that you add all regions that contain
18891889
the preprocessor language to the cluster htmlPreproc.
18901890

1891+
*html-folding*
1892+
The HTML syntax file provides syntax |folding| (see |:syn-fold|) between start
1893+
and end tags. This can be turned on by >
1894+
1895+
:let g:html_syntax_folding = 1
1896+
:set foldmethod=syntax
1897+
1898+
Note: Syntax folding might slow down syntax highlighting significantly,
1899+
especially for large files.
1900+
18911901

18921902
HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax*
18931903

@@ -5394,8 +5404,8 @@ CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line.
53945404
MatchParen Character under the cursor or just before it, if it
53955405
is a paired bracket, and its match. |pi_paren.txt|
53965406
*hl-MessageWindow*
5397-
MessageWindow Messages popup window used when 'cmdheight' is zero. If not
5398-
defined |hl-WarningMsg| is used.
5407+
MessageWindow Messages popup window used by `:echowindow`. If not defined
5408+
|hl-WarningMsg| is used.
53995409
*hl-ModeMsg*
54005410
ModeMsg 'showmode' message (e.g., "-- INSERT --").
54015411
*hl-MoreMsg*

runtime/doc/tags

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3069,6 +3069,9 @@ $quote eval.txt /*$quote*
30693069
:r! insert.txt /*:r!*
30703070
:range cmdline.txt /*:range*
30713071
:range! change.txt /*:range!*
3072+
:range-closed-fold cmdline.txt /*:range-closed-fold*
3073+
:range-offset cmdline.txt /*:range-offset*
3074+
:range-pattern cmdline.txt /*:range-pattern*
30723075
:re insert.txt /*:re*
30733076
:read insert.txt /*:read*
30743077
:read! insert.txt /*:read!*
@@ -4409,7 +4412,10 @@ E1305 textprop.txt /*E1305*
44094412
E1306 vim9.txt /*E1306*
44104413
E1307 vim9.txt /*E1307*
44114414
E1308 builtin.txt /*E1308*
4415+
E1309 map.txt /*E1309*
44124416
E131 userfunc.txt /*E131*
4417+
E1310 gui.txt /*E1310*
4418+
E1311 map.txt /*E1311*
44134419
E132 userfunc.txt /*E132*
44144420
E133 userfunc.txt /*E133*
44154421
E134 change.txt /*E134*
@@ -7610,6 +7616,7 @@ getloclist() builtin.txt /*getloclist()*
76107616
getmarklist() builtin.txt /*getmarklist()*
76117617
getmatches() builtin.txt /*getmatches()*
76127618
getmousepos() builtin.txt /*getmousepos()*
7619+
getmouseshape() builtin.txt /*getmouseshape()*
76137620
getpid() builtin.txt /*getpid()*
76147621
getpos() builtin.txt /*getpos()*
76157622
getqflist() builtin.txt /*getqflist()*
@@ -7933,6 +7940,7 @@ howto.txt howto.txt /*howto.txt*
79337940
hpterm term.txt /*hpterm*
79347941
hpterm-color syntax.txt /*hpterm-color*
79357942
html-flavor insert.txt /*html-flavor*
7943+
html-folding syntax.txt /*html-folding*
79367944
html-indent indent.txt /*html-indent*
79377945
html-indenting indent.txt /*html-indenting*
79387946
html.vim syntax.txt /*html.vim*
@@ -10340,6 +10348,7 @@ termdebug_popup terminal.txt /*termdebug_popup*
1034010348
termdebug_shortcuts terminal.txt /*termdebug_shortcuts*
1034110349
termdebug_use_prompt terminal.txt /*termdebug_use_prompt*
1034210350
termdebug_wide terminal.txt /*termdebug_wide*
10351+
termdebug_winbar terminal.txt /*termdebug_winbar*
1034310352
terminal terminal.txt /*terminal*
1034410353
terminal-api terminal.txt /*terminal-api*
1034510354
terminal-autoshelldir terminal.txt /*terminal-autoshelldir*

0 commit comments

Comments
 (0)