Skip to content

Commit f303503

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents f0c0b7a + eaef676 commit f303503

133 files changed

Lines changed: 2114 additions & 1102 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.

‎.github/actions/build_vim_on_linux/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ runs:
226226
if ${{ contains(fromJSON(inputs.extra), 'no_x11_wl') }}; then
227227
CONFOPT="${CONFOPT} --without-x --disable-gui --without-wayland --enable-socketserver"
228228
fi
229-
if ${{ inputs.coverage == true }}; then
229+
if ${{ inputs.coverage == 'true' }}; then
230230
CFLAGS="${CFLAGS} --coverage -DUSE_GCOV_FLUSH"
231231
echo "LDFLAGS=--coverage"
232232
fi

‎.github/workflows/vim_unused/ci-windows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
echo "SODIUM_DIR=${SODIUM_DIR}" >> $GITHUB_ENV
118118
echo "GETTEXT_PATH=D:\gettext${{ matrix.arch == 'x64' && '64' || '32' }}" >> $GITHUB_ENV
119119
120-
- uses: msys2/setup-msys2@v2.32.0
120+
- uses: msys2/setup-msys2@v2.33.0
121121
if: matrix.toolchain == 'mingw'
122122
with:
123123
update: true

‎AGENTS.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,14 @@ Further rules, not spelled out here, live in `runtime/doc/develop.txt`:
218218
`VerifyScreenDump`, and live dumps in `src/testdir/dumps/`.
219219
- `v9.CheckScriptSuccess(lines)` / `v9.CheckScriptFailure(lines, error, lnum)`
220220
are the standard way to test Vim9 script behavior at script-load time.
221+
- **Garbage Collection tests** Always write GC tests as a legacy func
222+
Test_...(), using let lines =<< trim END and call
223+
v9.CheckSourceSuccess(lines) with test_garbagecollect_now() invoked at script
224+
level inside lines (see Test_enum_garbagecollect() in
225+
src/testdir/test_vim9_enum.vim). Never call test_garbagecollect_now() while a
226+
Vim9 :def function is on the call stack—including passing lines from a def
227+
test—because :def stack values are not marked during GC, resulting in memory
228+
errors or crashes.
221229
- When fixing a bug reported as an issue, include a test that
222230
reproduces the original report, not just a minimal synthetic case.
223231
- Tests for Syntax runtime are in `runtime/syntax/testdir`

‎CODE_OF_CONDUCT.md‎

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Vim Code of Conduct
2+
3+
Vim has been built for decades by people from all over the world, most of
4+
whom do not speak English as their first language. We want to keep it a
5+
place where people enjoy working together.
6+
7+
## Our Pledge
8+
9+
We pledge to make our community welcoming, safe, and equitable for all.
10+
11+
We are committed to fostering an environment that respects and promotes the
12+
dignity, rights, and contributions of all individuals, regardless of
13+
characteristics including race, ethnicity, caste, color, age, physical
14+
characteristics, neurodiversity, disability, sex or gender, gender identity or
15+
expression, sexual orientation, language, philosophy or religion, national or
16+
social origin, socio-economic position, level of education, or other status.
17+
The same privileges of participation are extended to everyone who participates
18+
in good faith and in accordance with this Code of Conduct.
19+
20+
## Encouraged Behaviors
21+
22+
While acknowledging differences in social norms, we all strive to meet our
23+
community's expectations for positive behavior. We also understand that our
24+
words and actions may be interpreted differently than we intend based on
25+
culture, background, or native language.
26+
27+
With these considerations in mind, we agree to behave mindfully toward each
28+
other and act in ways that center our shared values, including:
29+
30+
1. Respecting the **purpose of our community**, our activities, and our ways of
31+
gathering.
32+
2. Engaging **kindly and honestly** with others.
33+
3. Respecting **different viewpoints** and experiences.
34+
4. **Taking responsibility** for our actions and contributions.
35+
5. Gracefully giving and accepting **constructive feedback**.
36+
6. Committing to **repairing harm** when it occurs.
37+
7. Behaving in other ways that promote and sustain the **well-being of our
38+
community**.
39+
40+
Most of us do not speak English as our first language. Keep that in mind
41+
when reading others' words, and do not use it as an excuse for rudeness.
42+
43+
Maintainers make the final decision on contributions, even when you
44+
disagree.
45+
46+
## Restricted Behaviors
47+
48+
We agree to restrict the following behaviors in our community. Instances,
49+
threats, and promotion of these behaviors are violations of this Code of
50+
Conduct.
51+
52+
1. **Harassment.** Violating explicitly expressed boundaries or engaging in
53+
unnecessary personal attention after any clear request to stop.
54+
2. **Character attacks.** Making insulting, demeaning, or pejorative comments
55+
directed at a community member or group of people.
56+
3. **Stereotyping or discrimination.** Characterizing anyone's personality or
57+
behavior on the basis of immutable identities or traits.
58+
4. **Sexualization.** Behaving in a way that would generally be considered
59+
inappropriately intimate in the context or purpose of the community.
60+
5. **Violating confidentiality.** Sharing or acting on someone's personal or
61+
private information without their permission.
62+
6. **Endangerment.** Causing, encouraging, or threatening violence or other
63+
harm toward any person or group.
64+
7. Behaving in other ways that **threaten the well-being** of our community.
65+
66+
### Other Restrictions
67+
68+
1. **Misleading identity.** Impersonating someone else for any reason, or
69+
pretending to be someone else to evade enforcement actions.
70+
2. **Failing to credit sources.** Not properly crediting the sources of content
71+
you contribute.
72+
3. **Promotional materials.** Sharing marketing or other commercial content in
73+
a way that is outside the norms of the community.
74+
4. **Irresponsible communication.** Failing to responsibly present content
75+
which includes, links or describes any other restricted behaviors.
76+
5. **Misusing project permissions.** Locking, closing, or blocking other
77+
people's contributions or discussions without a stated reason.
78+
6. **Manipulating discussions.** Voting on your own posts, using multiple
79+
accounts, or otherwise creating a false impression of support.
80+
7. **Driving people away.** Repeated hostility or dismissiveness that
81+
discourages others from participating.
82+
83+
### Use of AI in communication
84+
85+
Discussions, reviews, and mailing list posts should be written by you, in
86+
your own words.
87+
88+
- Fine: spell checking, grammar correction, and machine translation of text
89+
you wrote yourself (optionally mention that you used machine translation).
90+
- Not fine: posting AI-generated replies, reviews, summaries, or comments,
91+
whether marked as such or not. Anyone can generate such text at any
92+
time. It adds no value to a discussion and wastes readers' time.
93+
- If you want to share output from a tool (a static analyzer, a fuzzer, or
94+
an AI review), quote it clearly as tool output, keep it short, and add
95+
your own assessment of whether it is correct and relevant.
96+
97+
## Reporting an Issue
98+
99+
Tensions can occur between community members even when they are trying their
100+
best to collaborate. Not every conflict represents a code of conduct violation,
101+
and this Code of Conduct reinforces encouraged behaviors and norms that can
102+
help avoid conflicts and minimize harm.
103+
104+
Report problems privately to the current conduct team.
105+
Reports are kept confidential. Members of the conduct team who are
106+
involved in a reported issue will not take part in handling it.
107+
108+
Conduct team: Christian Brabandt, Doug Kearns, Yegappan Lakshmanan,
109+
Yasuhiro Matsumoto
110+
111+
## Enforcement
112+
113+
Depending on the severity, the conduct team may:
114+
115+
1. Send a private warning explaining what was wrong.
116+
2. Temporarily restrict participation.
117+
3. Permanently ban from the project's spaces.
118+
119+
This enforcement ladder is intended as a guideline. It does not limit the
120+
ability of the conduct team to use their discretion and judgment, in keeping
121+
with the best interests of the Vim community.
122+
123+
## Scope
124+
125+
This applies to all official Vim project spaces: the repositories of the
126+
vim GitHub organization (issues, pull requests, discussions), the vim_dev
127+
and vim_use mailing lists, and any other channel where someone acts on
128+
behalf of the project.
129+
130+
## Attribution
131+
132+
Adapted from the [Contributor Covenant](https://www.contributor-covenant.org/version/3/0/),
133+
version 3.0, by the Organization for Ethical Source, licensed under
134+
[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). This
135+
Code of Conduct is licensed under CC BY-SA 4.0 as well.

‎CONTRIBUTING.md‎

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ A pull request has the advantage that it will trigger the Continuous
1212
Integration tests, you will be warned of problems (you can ignore the coverage
1313
warning, it's noisy).
1414

15+
Do not submit a single PR that addresses multiple unrelated issues.
16+
1517
Please always add a test, if possible. All new functionality should be tested
1618
and bug fixes should be tested for regressions: the test should fail before the
1719
fix and pass after the fix. Look through recent patches for examples and find
@@ -48,12 +50,39 @@ approvers are happy with that particular change.
4850

4951
## Using AI
5052

51-
When using AI for contributions, please disclose this. Any AI-generated code
52-
must follow the Vim code style. In particular, [test_codestyle.vim][18]
53-
must not report any failures. Check the CI output for any test failures.
53+
Use of AI is allowed within the limits mentioned below, but you remain fully
54+
responsible for everything you submit. Disclosure of AI use is required, using
55+
an `Assisted-by:` trailer. [AGENTS.md](AGENTS.md) contains information and
56+
instructions for AI coding agents.
57+
58+
### What is acceptable
59+
60+
- Research, looking things up, understanding existing code.
61+
- Small, targeted fixes (e.g. for security issues).
62+
- Help with writing tests and benchmarks.
63+
64+
### What is not acceptable
65+
66+
- Large pull requests that were mostly generated. We may close pull
67+
requests that are too large to review with confidence, whatever their
68+
origin. Split large changes into smaller, reviewable steps.
69+
- Answering review questions by pasting AI output. Reviewers want to hear
70+
your own understanding of the change.
71+
- Posting AI-generated reviews on other people's pull requests. Automated
72+
CI checks are fine.
73+
- Generated commit messages or PR descriptions. Write them yourself
74+
that ensures you have a good understanding of the change. Fixing
75+
spelling, grammar and translations is fine.
76+
77+
### Your responsibility
78+
79+
- You must understand every line of your change and be able to explain it.
80+
- You must have the right to submit the code under the Vim license.
81+
- You are expected to fix problems your change introduces.
5482

55-
Ensure that changes are properly tested. Do not submit a single PR that
56-
addresses multiple unrelated issues.
83+
Maintainers decide whether a contribution is acceptable. See also the
84+
[Code of Conduct](CODE_OF_CONDUCT.md), which covers the use of AI in
85+
discussions.
5786

5887
# Reporting issues
5988

@@ -170,6 +199,5 @@ mailing list. For other questions you can join [`#vim`][19], use the
170199
[15]: https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin
171200
[16]: https://github.com/vim/vim/blob/master/runtime/doc/helphelp.txt
172201
[17]: https://github.com/vim/vim/issues
173-
[18]: https://github.com/vim/vim/blob/master/src/testdir/test_codestyle.vim
174202
[19]: https://web.libera.chat/#vim
175203
[20]: https://github.com/vim/vim-win32-installer

‎Filelist‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ SRC_ALL = \
2626
.clang-format \
2727
.codecov.yml \
2828
.editorconfig \
29+
CODE_OF_CONDUCT.md \
2930
ci/config.mk*.sed \
31+
ci/ddebs.list \
3032
ci/gen_testset.py \
31-
ci/if_ver*.vim \
3233
ci/if_feat_check.vim \
34+
ci/if_ver*.vim \
3335
ci/lychee.toml \
34-
ci/setup-xvfb.sh \
35-
ci/setup-weston.sh \
36-
ci/remove_snap.sh \
37-
ci/ddebs.list \
3836
ci/pinned-pkgs \
37+
ci/remove_snap.sh \
38+
ci/setup-weston.sh \
39+
ci/setup-xvfb.sh \
3940
src/Make_all.mak \
4041
src/Make_tags.mak \
4142
src/README.md \

‎runtime/autoload/cargo/quickfix.vim‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
" Last Modified: 2023-09-11
2+
" 2026 Oct 15 by Vim project: Fix code injection via crafted directory names
23

34
function! cargo#quickfix#CmdPre() abort
45
if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo' &&
@@ -7,8 +8,8 @@ function! cargo#quickfix#CmdPre() abort
78
let b:rust_compiler_cargo_qf_has_lcd = haslocaldir()
89
let b:rust_compiler_cargo_qf_prev_cd = getcwd()
910
let b:rust_compiler_cargo_qf_prev_cd_saved = 1
10-
let l:nearest = fnamemodify(cargo#nearestRootCargo(0), ':h')
11-
execute 'lchdir! '.l:nearest
11+
let nearest = fnamemodify(cargo#nearestRootCargo(0), ':h')
12+
call chdir(nearest, 'window')
1213
else
1314
let b:rust_compiler_cargo_qf_prev_cd_saved = 0
1415
endif
@@ -17,11 +18,8 @@ endfunction
1718
function! cargo#quickfix#CmdPost() abort
1819
if exists("b:rust_compiler_cargo_qf_prev_cd_saved") && b:rust_compiler_cargo_qf_prev_cd_saved
1920
" Restore the current directory.
20-
if b:rust_compiler_cargo_qf_has_lcd
21-
execute 'lchdir! '.b:rust_compiler_cargo_qf_prev_cd
22-
else
23-
execute 'chdir! '.b:rust_compiler_cargo_qf_prev_cd
24-
endif
21+
let scope = ['global', 'window', 'tabpage']
22+
call chdir(b:rust_compiler_cargo_qf_prev_cd, scope[b:rust_compiler_cargo_qf_has_lcd])
2523
let b:rust_compiler_cargo_qf_prev_cd_saved = 0
2624
endif
2725
endfunction

‎runtime/autoload/gnat.vim‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
" autoload
1919
" 05.11.2006 MK Bram suggested to save on spaces
2020
" 19.09.2007 NO use project file only when there is a project
21+
" 14.10.2026 by Vim Project: quote project files in commands
2122
" Help Page: compiler-gnat
2223
"------------------------------------------------------------------------------
2324

@@ -113,10 +114,10 @@ function gnat#New () " {{{1
113114
\ 'Set_Session' : function ('gnat#Set_Session'),
114115
\ 'Get_Command' : function ('gnat#Get_Command'),
115116
\ 'Project_File' : '',
116-
\ 'Make_Command' : '"gnat make -P " . self.Project_File . " -F -gnatef "',
117-
\ 'Pretty_Command' : '"gnat pretty -P " . self.Project_File . " "',
118-
\ 'Find_Program' : '"gnat find -P " . self.Project_File . " -F "',
119-
\ 'Tags_Command' : '"gnat xref -P " . self.Project_File . " -v *.AD*"',
117+
\ 'Make_Command' : '"gnat make -P " . shellescape(self.Project_File, 1) . " -F -gnatef "',
118+
\ 'Pretty_Command' : '"gnat pretty -P " . shellescape(self.Project_File, 1) . " "',
119+
\ 'Find_Command' : '"gnat find -P " . shellescape(self.Project_File, 1) . " -F "',
120+
\ 'Tags_Command' : '"gnat xref -P " . shellescape(self.Project_File, 1) . " -v *.AD*"',
120121
\ 'Error_Format' : '%f:%l:%c: %trror: %m,' .
121122
\ '%f:%l:%c: %tarning: %m,' .
122123
\ '%f:%l:%c: (%ttyle) %m'}

‎runtime/autoload/rubycomplete.vim‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
" Maintainer: Mark Guzman <segfault@hasno.info>
44
" URL: https://github.com/vim-ruby/vim-ruby
55
" Last Change: 2023 Dec 31
6+
" 2026 Oct 12 by Vim project: prevent code injection
67
" ----------------------------------------------------------------------------
78
"
89
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
@@ -199,7 +200,7 @@ function! s:GetRubyVarType(v)
199200
return 'Proc'
200201
elseif strlen(str) > 4
201202
let l = stridx(str,'.')
202-
return str[0:l-1]
203+
return str[0:l-1] =~# '^\%(::\)\=\u\w*\%(::\u\w*\)*$' ? cand : ''
203204
end
204205
return ''
205206
endif
@@ -750,8 +751,10 @@ class VimRubyCompletion
750751
load_buffer_class( vartype )
751752

752753
begin
753-
methods = eval("#{vartype}.instance_methods")
754-
variables = eval("#{vartype}.instance_variables")
754+
# look up the constant, do not evaluate buffer text
755+
klass = vartype.sub(/\A::/, "").split("::").inject(Object) { |m, n| m.const_get(n) }
756+
methods = klass.instance_methods
757+
variables = klass.instance_variables
755758
rescue Exception
756759
dprint "load_buffer_class err: %s" % $!
757760
end

‎runtime/colors/blue.vim‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
" Maintainer: Original maintainer Steven Vertigan <steven@vertigan.wattle.id.au>
55
" URL: https://github.com/vim/colorschemes
66
" License: Same as Vim
7-
" Last Change: 2026 Apr 24
7+
" Last Change: 2026 Oct 02
88

9-
" Generated by Colortemplate v3.0.0-rc1
9+
" Generated by Colortemplate v3.0.0-rc3
1010

1111
set background=dark
1212

1313
hi clear
1414
let g:colors_name = 'blue'
1515

1616
let s:t_Co = has('gui_running') ? 16777216 : str2nr(&t_Co)
17-
let s:tgc = has('termguicolors') && &termguicolors
17+
let s:tgc = has('termguicolors') && &termguicolors && !has('gui_running')
1818

1919
let g:terminal_ansi_colors = ['#000000', '#cd0000', '#00cd00', '#cdcd00', '#0000ee', '#cd00cd', '#00cdcd', '#e5e5e5', '#7f7f7f', '#ff0000', '#00ff00', '#ffff00', '#5c5cff', '#ff00ff', '#00ffff', '#ffffff']
2020

0 commit comments

Comments
 (0)