Skip to content

Commit 0e84dfb

Browse files
committed
Merge remote-tracking branch 'vim/master' into staging
2 parents f549655 + b32da7d commit 0e84dfb

File tree

161 files changed

+4424
-2089
lines changed

Some content is hidden

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

161 files changed

+4424
-2089
lines changed

.github/actions/test_artifacts/action.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,39 @@ description: "Upload failed test artifacts"
33
runs:
44
using: "composite"
55
steps:
6+
- name: Collect matrix properties for naming
7+
uses: actions/github-script@v8
8+
id: matrix-props
9+
env:
10+
MATRIX_PROPS: ${{ toJSON(matrix) }}
11+
with:
12+
# An array-flattening-to-string JavaScript function.
13+
script: |
14+
const f = function (x) { return x.toString().length > 0; }
15+
const g = function (x) {
16+
return (Array.isArray(x))
17+
? x.filter(f)
18+
.map((function (h) { return function (y) { return h(y); }; })(g))
19+
.join('-')
20+
: x;
21+
}
22+
return Object.values(JSON.parse(process.env.MATRIX_PROPS))
23+
.filter(f)
24+
.map(g)
25+
.join('-');
26+
# By default, the JSON-encoded return value of the function is
27+
# set as the "result".
28+
result-encoding: string
629
- name: Upload failed tests
730
uses: actions/upload-artifact@v4
831
with:
932
# Name of the artifact to upload.
10-
name: GH-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}-${{ join(matrix.*, '-') }}-failed-tests
33+
name: ${{ format('GH-{0}-{1}-{2}-{3}-{4}-failed-tests',
34+
github.run_id,
35+
github.run_attempt,
36+
github.job,
37+
strategy.job-index,
38+
steps.matrix-props.outputs.result) }}
1139

1240
# A file, directory or wildcard pattern that describes what
1341
# to upload.

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
# Initializes the CodeQL tools for scanning.
5050
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@v3
51+
uses: github/codeql-action/init@v4
5252
with:
5353
languages: ${{ matrix.language }}
5454
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -59,7 +59,7 @@ jobs:
5959
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6060
# If this step fails, then you should remove it and run the build manually (see below)
6161
- name: Autobuild
62-
uses: github/codeql-action/autobuild@v3
62+
uses: github/codeql-action/autobuild@v4
6363

6464
# ℹ️ Command-line programs to run using the OS shell.
6565
# 📚 https://git.io/JvXDl
@@ -73,4 +73,4 @@ jobs:
7373
# make release
7474

7575
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@v3
76+
uses: github/codeql-action/analyze@v4

runtime/autoload/tutor.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function! tutor#TutorCmd(tutor_name)
211211
endif
212212

213213
call tutor#SetupVim()
214-
exe "edit ".l:to_open
214+
exe "drop ".l:to_open
215215
call tutor#EnableInteractive(v:true)
216216
endfunction
217217

@@ -225,7 +225,7 @@ endfunction
225225
function! tutor#EnableInteractive(enable)
226226
let enable = a:enable
227227
if enable
228-
setlocal buftype=nofile
228+
setlocal buftype=nowrite
229229
setlocal concealcursor+=inv
230230
setlocal conceallevel=2
231231
call tutor#ApplyMarks()

runtime/autoload/vimcomplete.vim

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ vim9script
33
# Vim completion script
44
# Language: Vim script
55
# Maintainer: Maxim Kim <habamax@gmail.com>
6-
# Last Change: 2025-08-27
6+
# Last Change: 2025-10-15
77
#
88
# Usage:
99
# setlocal omnifunc=vimcomplete#Complete
@@ -22,19 +22,23 @@ def GetTrigger(line: string): list<any>
2222
result = 'function'
2323
elseif line =~ '\v%(^|\s+)\&\k*$'
2424
result = 'option'
25+
elseif line =~ '\vse%[t]\s+(\k+\s+)*no\k*$'
26+
result = 'nooption'
27+
result_len = -2
2528
elseif line =~ '[\[(]\s*$'
2629
result = 'expression'
2730
elseif line =~ '[lvgsb]:\k*$'
2831
result = 'var'
2932
result_len = 2
30-
else
33+
elseif line !~ '^\s*$'
3134
result = getcompletiontype(line) ?? 'cmdline'
3235
endif
3336
return [result, result_len]
3437
enddef
3538

3639
export def Complete(findstart: number, base: string): any
3740
if findstart > 0
41+
prefix = ""
3842
var line = getline('.')->strpart(0, col('.') - 1)
3943
var keyword = line->matchstr('\k\+$')
4044
var stx = synstack(line('.'), col('.') - 1)->map('synIDattr(v:val, "name")')->join()
@@ -57,6 +61,9 @@ export def Complete(findstart: number, base: string): any
5761
elseif trigger == 'option'
5862
items = getcompletion(base, 'option')
5963
->mapnew((_, v) => ({word: v, kind: 'v', menu: 'Option', dup: 0}))
64+
elseif trigger == 'nooption'
65+
items = getcompletion(base[2 : ], 'option')
66+
->mapnew((_, v) => ({word: v, kind: 'v', menu: 'Option', dup: 0}))
6067
elseif trigger == 'var'
6168
items = getcompletion(base, 'var')
6269
->mapnew((_, v) => ({word: v, kind: 'v', menu: 'Variable', dup: 0}))
@@ -71,8 +78,11 @@ export def Complete(findstart: number, base: string): any
7178
items = commands + functions
7279
else
7380
try
74-
items = getcompletion(prefix, 'cmdline')
75-
->mapnew((_, v) => ({word: v->matchstr('\k\+'), kind: 'v', dup: 0}))
81+
# :! and :term completion is very slow on Windows and WSL, disable it there.
82+
if !((has("win32") || has("win32unix") || exists("$WSLENV")) && getcompletiontype(prefix) == 'shellcmd')
83+
items = getcompletion(prefix, 'cmdline')
84+
->mapnew((_, v) => ({word: v->matchstr('\k\+'), kind: 'v', dup: 0}))
85+
endif
7686
catch /E220/
7787
endtry
7888

runtime/autoload/vimgoto.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ vim9script
44
# Contributers: @lacygoill
55
# Shane-XB-Qian
66
# Andrew Radev
7-
# Last Change: 2025 Sep 21
7+
# Last Change: 2025 Oct 17
88
#
9-
# Vim Script to handle jumping to the targets of several types of Vim commands
9+
# Vim script to handle jumping to the targets of several types of Vim commands
1010
# (:import, :packadd, :runtime, :colorscheme), and to autoloaded functions of
1111
# the style <path>#<function_name>.
1212
#

runtime/doc/arabic.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*arabic.txt* For Vim version 9.1. Last change: 2021 Jun 22
1+
*arabic.txt* For Vim version 9.1. Last change: 2025 Oct 14
22

33

44
VIM REFERENCE MANUAL by Nadim Shaikli
@@ -191,7 +191,7 @@ o Enable Arabic settings [short-cut]
191191

192192
To activate the Arabic keymap (i.e. to remap your English/Latin
193193
keyboard to look-n-feel like a standard Arabic one), set the
194-
'keymap' command to "arabic". This is done by entering
194+
'keymap' option to "arabic". This is done by entering
195195
>
196196
:set keymap=arabic
197197
<

runtime/doc/autocmd.txt

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 9.1. Last change: 2025 Sep 14
1+
*autocmd.txt* For Vim version 9.1. Last change: 2025 Oct 12
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -236,7 +236,7 @@ autocmds.
236236

237237
*:autocmd-verbose*
238238
When 'verbose' is non-zero, listing an autocommand will also display where it
239-
was last defined. Example: >
239+
was last defined. Example: >
240240
241241
:verbose autocmd BufEnter
242242
FileExplorer BufEnter
@@ -346,7 +346,8 @@ Name triggered by ~
346346
|GUIEnter| after starting the GUI successfully
347347
|GUIFailed| after starting the GUI failed
348348
|TermResponse| after the terminal response to |t_RV| is received
349-
|TermResponseAll| after the terminal response to |t_RV| and others is received
349+
|TermResponseAll| after the terminal response to |t_RV| and others is
350+
received
350351

351352
|QuitPre| when using `:quit`, before deciding whether to exit
352353
|ExitPre| when using a command that may make Vim exit
@@ -383,7 +384,8 @@ Name triggered by ~
383384
|FocusGained| Vim got input focus
384385
|FocusLost| Vim lost input focus
385386
|CursorHold| the user doesn't press a key for a while
386-
|CursorHoldI| the user doesn't press a key for a while in Insert mode
387+
|CursorHoldI| the user doesn't press a key for a while in Insert
388+
mode
387389
|CursorMoved| the cursor was moved in Normal mode
388390
|CursorMovedC| the cursor was moved in the |Command-line|
389391
|CursorMovedI| the cursor was moved in Insert mode
@@ -568,7 +570,8 @@ BufWinEnter After a buffer is displayed in a window. This
568570
since it reloads that buffer.
569571
Does not happen for a terminal window, because
570572
it starts in Terminal-Job mode and Normal mode
571-
commands won't work. Use |TerminalOpen| instead.
573+
commands won't work. Use |TerminalOpen|
574+
instead.
572575
*BufWinLeave*
573576
BufWinLeave Before a buffer is removed from a window.
574577
Not when it's still visible in another window.
@@ -681,7 +684,7 @@ ColorScheme After loading a color scheme. |:colorscheme|
681684
Not triggered if the color scheme is not
682685
found.
683686
The pattern is matched against the
684-
colorscheme name. <afile> can be used for the
687+
colorscheme name. <afile> can be used for the
685688
name of the actual file where this option was
686689
set, and <amatch> for the new colorscheme
687690
name.
@@ -750,7 +753,7 @@ CursorHold When the user doesn't press a key for the time
750753
triggered. |q|
751754
*<CursorHold>*
752755
Internally the autocommand is triggered by the
753-
<CursorHold> key. In an expression mapping
756+
<CursorHold> key. In an expression mapping
754757
|getchar()| may see this character.
755758

756759
Note: Interactive commands cannot be used for
@@ -1016,7 +1019,7 @@ InsertLeave Just after leaving Insert mode. Also when
10161019
using CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
10171020
*KeyInputPre*
10181021
KeyInputPre Just before a key is processed after mappings
1019-
have been applied. The pattern is matched
1022+
have been applied. The pattern is matched
10201023
against a string that indicates the current
10211024
mode, which is the same as what is returned by
10221025
`mode(1)`.
@@ -1048,7 +1051,7 @@ MenuPopup Just before showing the popup menu (under the
10481051
c Command line
10491052
tl Terminal
10501053
*ModeChanged*
1051-
ModeChanged After changing the mode. The pattern is
1054+
ModeChanged After changing the mode. The pattern is
10521055
matched against `'old_mode:new_mode'`, for
10531056
example match against `*:c*` to simulate
10541057
|CmdlineEnter|.
@@ -1084,18 +1087,18 @@ OptionSet After setting an option. The pattern is
10841087

10851088
|v:option_oldlocal| is only set when |:set|
10861089
or |:setlocal| or a |modeline| was used to set
1087-
the option. Similarly |v:option_oldglobal| is
1090+
the option. Similarly |v:option_oldglobal| is
10881091
only set when |:set| or |:setglobal| was used.
10891092

10901093
This does not set |<abuf>|, you could use
10911094
|bufnr()|.
10921095

10931096
Note that when setting a |global-local| string
10941097
option with |:set|, then |v:option_old| is the
1095-
old global value. However, for all other kinds
1096-
of options (local string options, global-local
1097-
number options, ...) it is the old local
1098-
value.
1098+
old global value. However, for all other
1099+
kinds of options (local string options,
1100+
global-local number options, ...) it is the
1101+
old local value.
10991102

11001103
OptionSet is not triggered on startup and for
11011104
the 'key' option for obvious reasons.
@@ -1107,7 +1110,7 @@ OptionSet After setting an option. The pattern is
11071110

11081111
Note: It's a bad idea to reset an option
11091112
during this autocommand, this may break a
1110-
plugin. You can always use `:noa` to prevent
1113+
plugin. You can always use `:noa` to prevent
11111114
triggering this autocommand.
11121115

11131116
When using |:set| in the autocommand the event
@@ -1138,7 +1141,7 @@ QuickFixCmdPre Before a quickfix command is run (|:make|,
11381141
*QuickFixCmdPost*
11391142
QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
11401143
command is run, before jumping to the first
1141-
location. For |:cfile| and |:lfile| commands
1144+
location. For |:cfile| and |:lfile| commands
11421145
it is run after the error file is read and
11431146
before moving to the first error.
11441147
See |QuickFixCmdPost-example|.
@@ -1182,7 +1185,7 @@ SafeState When nothing is pending, going to wait for the
11821185
screen was scrolled for messages.
11831186
*SafeStateAgain*
11841187
SafeStateAgain Like SafeState but after processing any
1185-
messages and invoking callbacks. This may be
1188+
messages and invoking callbacks. This may be
11861189
triggered often, don't do something that takes
11871190
time.
11881191

@@ -1286,12 +1289,12 @@ TermChanged After the value of 'term' has changed. Useful
12861289
settings. Executed for all loaded buffers.
12871290
*TerminalOpen*
12881291
TerminalOpen Just after a terminal buffer was created, with
1289-
`:terminal` or |term_start()|. This event is
1292+
`:terminal` or |term_start()|. This event is
12901293
triggered even if the buffer is created
12911294
without a window, with the ++hidden option.
12921295
*TerminalWinOpen*
12931296
TerminalWinOpen Just after a terminal buffer was created, with
1294-
`:terminal` or |term_start()|. This event is
1297+
`:terminal` or |term_start()|. This event is
12951298
triggered only if the buffer is created
12961299
with a window. Can be used to set window
12971300
local options for the terminal window.
@@ -1488,7 +1491,7 @@ WinLeave Before leaving a window. If the window to be
14881491
Not used for ":qa" or ":q" when exiting Vim.
14891492

14901493
*WinNewPre*
1491-
WinNewPre Before creating a new window. Triggered
1494+
WinNewPre Before creating a new window. Triggered
14921495
before commands that modify window layout by
14931496
creating a split.
14941497
Not done when creating tab pages and for the
@@ -1797,8 +1800,8 @@ option will not cause any commands to be executed.
17971800
After applying the autocommands the modelines are
17981801
processed, so that their settings overrule the
17991802
settings from autocommands, like what happens when
1800-
editing a file. This is skipped when the <nomodeline>
1801-
argument is present. You probably want to use
1803+
editing a file. This is skipped when the <nomodeline>
1804+
argument is present. You probably want to use
18021805
<nomodeline> for events that are not used when loading
18031806
a buffer, such as |User|.
18041807
Processing modelines is also skipped when no
@@ -1810,7 +1813,7 @@ option will not cause any commands to be executed.
18101813
loaded buffer. The current buffer is done last.
18111814

18121815
Note that [fname] is used to select the autocommands,
1813-
not the buffers to which they are applied. Example: >
1816+
not the buffers to which they are applied. Example: >
18141817
augroup mine
18151818
autocmd!
18161819
autocmd FileType * echo expand('<amatch>')

0 commit comments

Comments
 (0)