100 Commits
Author SHA1 Message Date
53211ade2b vim-patch:9.2.0969: runtime(shaderslang): matchit % breaks on braces (#41371)
Problem:  b:match_words groups "{" with the if/for/while/switch keywords
          and "}" with "break" which breaks % matching on braces
Solution: Drop the brace and bracket groups, matchit appends
          'matchpairs' by itself (Matthias Bruns).

matchit counts every alternative in a group instead of pairing the
alternatives with each other.  Listing `{` alongside the if, for,
while, switch, struct and class keywords therefore makes a line such
as `for (...) {` count as two openers, and listing `break` alongside
`}` lets a brace pair with a break statement.  As a result % on the
opening brace of a function does not move at all, and % on
`switch (x) {` jumps to `break;` instead of the closing brace.

Braces and brackets do not need to be listed: matchit appends
'matchpairs' to b:match_words by itself.  Drop them and leave the
preprocessor group unchanged.

closes: vim/vim#21064

https://github.com/vim/vim/commit/08c74ce09a9269b93b01ff2289683ad63f396fba

Co-authored-by: Matthias Bruns <matthiasbruns35@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 07:47:24 +08:00
zeertzjqandXiaowenHu96 82c751db4e vim-patch:9.2.0967: hit-enter prompt eats keys from a running mapping (#41359)
Problem:  The hit-enter prompt fires whenever a message scrolls the screen.
          When this happens while a mapping is being processed, it consumes
          the mapping's next key, causing unexpected behavior for users.
Solution: Similar to what 9.1.1969 did for stuffed characters, skip the
          hit-enter prompt when there are still keys pending from a mapping
          in the typeahead buffer.

related: neovim/neovim#38298
related: neovim/neovim#20635
related: neovim/neovim#30890
closes:  vim/vim#20753

AI assisted.

https://github.com/vim/vim/commit/6025ea9e029b0681df37ee19e0d3992fb7f4d7fd

Co-authored-by: XiaowenHu96 <me@xiaowenhu.com>
2026-08-18 09:23:34 +08:00
bce3bf06a3 vim-patch:9.2.0963: crash when sound-folding a crafted spell file (#41358)
Problem:  A SAL rule longer than MAXWLEN is silently truncated to an
          empty lead.  set_sal_first() then reorders the sl_sal entries
          by their index byte and can move the terminating sentinel out
          of the last slot, so spell_soundfold_wsal() reads past the end
          of the array, e.g. when soundfold() or spellsuggest() is used
          (Erick Alex).
Solution: Bound the sound-folding loops against sl_sal.ga_len.

closes: vim/vim#21076

https://github.com/vim/vim/commit/6ac008db969677304ba888854e5d44a32ce79853

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 09:03:37 +08:00
zeertzjqandChristian Brabandt cc25b2f13c vim-patch:9.2.0960: double-free in string_reduce() (#41357)
Problem:  string_reduce() copies *rettv into argv[0] before calling
          eval_expr_typval().  When the evaluator fails early, rettv is
          never reset and still aliases argv[0] v_string.
          clear_tv(&argv[0]) frees it, leaving rettv dangling and when
          in vim9script get_func_tv() frees it again (Ave Dva).
Solution: Set rettv->v_type = VAR_UNKNOWN like what is done in
          list_reduce() and tuple_reduce(), use tv_get_string_strict()
          in f_reduce()

closes: vim/vim#21048

Supported by AI.

https://github.com/vim/vim/commit/cd59994c455a20d39d5cc41b4978ecfd2bf4be2e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-08-18 09:03:27 +08:00
zeertzjq 2edb1c0009 fix(lua): don't limit indexed vim.cmd positional argument count (#41317) 2026-08-16 07:25:04 +08:00
zeertzjqandAliaksei Budavei 24183950e1 vim-patch:5d41506: runtime(sh): Selectively suppress matching syntax errors (#41302)
As a refinement upon "g:sh_no_error", support not matching
particular classes of syntax errors.  Look up syntax rule
names and list them with:
‐-----------------------------------------------------------
let g:sh_no_error_rules = ["shCurlyError", "shParenError"]
‐-----------------------------------------------------------

closes: vim/vim#20935

https://github.com/vim/vim/commit/5d41506eb4895fbf0b6ccf4067c7f6e3c8ac568b

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2026-08-14 08:47:30 +08:00
zeertzjqandFionn Fitzmaurice 1a9467ab44 vim-patch:9.2.0957: filetype: ArgoCD config file is not recognized (#41301)
Problem:  filetype: ArgoCD configuration file is not recognized
Solution: Detect */argocd/config as yaml filetype (Fionn Fitzmaurice).

Reference:
https://argo-cd.readthedocs.io/en/latest/user-guide/commands/argocd_configure/#options-inherited-from-parent-commands

closes: vim/vim#21031

https://github.com/vim/vim/commit/7807dd22793da0e826618c0ca9c6210bbc1ea3f5

Co-authored-by: Fionn Fitzmaurice <git@fionn.computer>
2026-08-14 08:47:14 +08:00
zeertzjqandEmilien Breton ca88ad10c8 vim-patch:e402d1c: runtime(doc): improve documentation for |v_gF| (#41300)
https://github.com/vim/vim/commit/e402d1c443ec9f542df0503d765a09c32eabd7b4

Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
2026-08-14 07:46:52 +08:00
zeertzjqandDoug Kearns e8a1addb5a vim-patch:90a9a8c: runtime(algol68): Update syntax, fix syncing (#41291)
Use "fromstart" syncing.

Pragment regions are delimited by shared start/end tokens which render
other syncing types largely useless.  A sync point located in the middle
of a multiline comment cannot distinguish the end token from a start
token and the erroneously created region runs to EOF.

closes: vim/vim#21032

https://github.com/vim/vim/commit/90a9a8c7523741f4a9cd091a0f1727902e8c9340

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-08-13 08:27:50 +08:00
zeertzjq f75e87fcfc Merge pull request #41290 from zeertzjq/vim-9.2.0945
vim-patch:9.2.{0945,0950,0953,0954}
2026-08-13 08:15:39 +08:00
2dec97464c vim-patch:9.2.0954: u_read_undo() can be improved (after 9.2.0935)
Problem:  u_read_undo() has comments that do not add anything to what
          the code says (afte rv9.2.0935).
Solution: Drop the redundant comments (Hirohito Higashi).

related: vim/vim#20942
closes:  vim/vim#21028

https://github.com/vim/vim/commit/ecfea491aa964311a42f888277da7911c9d6900d

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 07:52:57 +08:00
7525e87f10 vim-patch:9.2.0953: insert completion code can be improved
Problem:  The duplicate-check hashtab in insexpand.c has comments that
          do not add anything to what the code says (after v9.2.0909).
Solution: Drop the redundant comments.

related: vim/vim#20926
closes:  vim/vim#21027

https://github.com/vim/vim/commit/4dde4afa1d188d92aa7ae91db43956bd83aad758

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 07:52:57 +08:00
39dc19bab4 vim-patch:9.2.0950: transstr() can be improved (after 9.2.0906)
Problem:  transstr() has comments that do not add anything to what the
          code says, and it casts a length to int only to cast it back to
          size_t.
Solution: Drop the comments and keep the length in a size_t
          (Hirohito Higashi).

related: vim/vim#20925
closes:  vim/vim#21026

https://github.com/vim/vim/commit/fe65307d49b482ffdd4c81ce46352ee091e2c67b

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 07:52:57 +08:00
5e0d4ba389 vim-patch:9.2.0945: sort() with a numeric option can be improved
Problem:  The comments on the precomputed sort keys explain the code by
          contrasting it with the previous implementation, and one of
          them exceeds 80 columns (after v9.2.0937).
Solution: Drop the redundant comments and shorten the union member ones
          (Hirohito Higashi).

related: vim/vim#21003
closes:  vim/vim#21030

https://github.com/vim/vim/commit/722f4292e55d48520b7e32cabb4b8640293d0977

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 07:52:57 +08:00
f33c92348a vim-patch:9.2.0937: sort() with a numeric option converts each item on every comparison (#41286)
Problem:  sort() with "n", "N" or "f" converts an item to its number on
          every comparison.  For "n" that is a tv2string() plus strtod()
          per comparison, so sorting a list of numbers turns each number
          into a string and back O(n log n) times, dwarfing the sort.
Solution: Compute the numeric key of each item once, before the sort,
          and compare the stored key (Samuel Schlesinger).  Only the
          builtin numeric compare modes are affected; uniq(), which
          passes a bare list item to the compare function, and the
          string and user-function paths are unchanged.

Sorting a list of 100000 numbers (min of 3, macOS arm64):
- sort(l, 'n'):  0.205s -> 0.017s
- sort(l, 'N'):  0.017s -> 0.010s
- sort(l, 'f'):  0.014s -> 0.010s
The result is identical, including that a string is still treated as 0
in "n" mode and that "N" keeps full 64-bit precision.

Add Test_sort_numeric_precomputed(): a large shuffled list sorted with
"n", mixed integers and floats, int64 values beyond the exact range of
a double for "N", and uniq() over the non-precomputed path.

closes: vim/vim#21003

https://github.com/vim/vim/commit/c8c59db9dfdc2db5f17aa0a78ea1464f035bdf5e

Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-12 11:45:38 +00:00
a0dc3f0067 vim-patch:9.2.0935: reading an undo file is slow with many undo headers (#41285)
Problem:  Reading an undo file resolves every stored sequence number
          with a linear scan over all headers, making loading
          quadratic in the number of undo states.
Solution: Sort uhp_table on uh_seq once and resolve each reference
          with a binary search; the duplicate uh_seq check becomes a
          single pass over the sorted table (Samuel Schlesinger).

At the default 'undolevels' of 1000 the quadratic cost is not
measurable; it takes 'undolevels' in the tens of thousands to matter.
Loading an undo file with 20000 states and 50 alternate branches with
:rundo goes from 1.49s to 0.11s (min of 3, macOS arm64), with the
same undotree().

Also make old_idx/new_idx/cur_idx and the loop index "i" long instead
of short/int: they index uhp_table, whose length num_head is a long
read from the file.  A short index truncated above 32767 headers,
making the restored b_u_oldhead/b_u_newhead/b_u_curhead pointers
wrong in exactly the many-headers case this change is about.

Add tests: a round-trip test with alternate branches that compares
the entries of the tree and the text at every sequence number, a
corruption test with a duplicated uh_seq, and a test for reading an
undo file with zero headers, which is written when only the line for
the "U" command is saved.

closes: vim/vim#20942

https://github.com/vim/vim/commit/fccf613c8f5b550797c08a45a768e14adefd882f

Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-12 10:00:09 +08:00
zeertzjqandChristian Brabandt ecaf9e9396 vim-patch:02bf089: runtime(doc): clarify diff_filler() function (#41283)
fixes: vim/vim#20990

https://github.com/vim/vim/commit/02bf0893d536449548f91b75817748a5e25219c0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-08-12 08:24:48 +08:00
e9dc4da86e vim-patch:9.2.0938: cursorbind: cursor in the other window is not updated after undo (#41282)
Problem:  In diff mode with 'cursorbind' the cursor in the other window is
          not updated after an undo that changes which lines correspond.
Solution: Also check whether the text changed before skipping the update
          (Hirohito Higashi).

fixes:   vim/vim#20982
related: vim/vim#13219
related: vim/vim#13210
closes:  vim/vim#21004

https://github.com/vim/vim/commit/2045a20d4bf604c47828bfc22d2da25f0294bc01

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 00:16:08 +00:00
2757f6eef9 vim-patch:9.2.0933: u_read_undo() leaks the file name when the undo file owner differs (#41269)
Problem:  When the owner of an undo file differs from the owner of
          the text file and the current user, u_read_undo() returns
          without freeing the file name it allocated with
          u_get_undo_file_name().
Solution: Free the file name before returning (Samuel Schlesinger).

Every other exit of the function frees it under the "theend" label;
this early return sits before the file pointer is initialized, so it
cannot use that label.

closes: vim/vim#20987

https://github.com/vim/vim/commit/d03735e8d29a228e6a37300335983101edb69431

Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-11 10:35:51 +08:00
7be8a8dda3 vim-patch:9.2.0932: NFA engine fallback can double free the compiled program (#41268)
Problem:  When the automatic regexp engine falls back to the
          backtracking engine in vim_regexec_string(), the compiled
          program is freed before the replacement is compiled; when
          saving the pattern fails from being out of memory the
          caller's "regprog" is left pointing to freed memory and
          is freed again.
Solution: Free the previous program only after compiling the
          replacement succeeded, like vim_regexec_multi() already
          does (Samuel Schlesinger).

closes: vim/vim#20986

https://github.com/vim/vim/commit/cab0901f121d0fab74c9a42bb90583d59b3d3c21

Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-11 10:19:52 +08:00
zeertzjqandDoug Kearns 5bc08dbb46 vim-patch:6163d99: runtime(doc): Improve :help expr-number, mention unary +/- (#41267)
- Mention unary +/- use in both integer and floating-point descriptions.
- Add "0b" binary prefix tag to match existing "0o" and "0x" tags.

closes: vim/vim#20997

https://github.com/vim/vim/commit/6163d99a32a559e0a5387989f09c43c7870c249f

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-08-11 10:19:38 +08:00
zeertzjqandJosef Schönberger 5f15c0e959 vim-patch:2e8c81e: runtime(strace): highlight stack trace as comment (#41266)
strace supports printing a complete stack trace for each syscall using
the `-k` (`--stack-trace`) flag. Highlight the trace as a comment.

closes: vim/vim#20998

https://github.com/vim/vim/commit/2e8c81ea093ca84fa8402cb140422d5338bbb6d9

Co-authored-by: Josef Schönberger <josef.schoenberger@tum.de>
2026-08-11 01:30:08 +00:00
zeertzjqandEmilien Breton 2b29905c7f vim-patch:9.2.0927: curswant not set on 8g8 (#41255)
Problem:  curswant not set on 8g8
Solution: Set curswant, adjust tests (Emilien Breton)

closes: vim/vim#20979

https://github.com/vim/vim/commit/7fe5cb35f988774745750f89d8adf215c060f57b

Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
2026-08-10 00:39:14 +00:00
zeertzjq 9f600c8914 Merge pull request #41243 from janlazo/vim-8.2.1590
vim-patch:8.2.{1590,1597}
2026-08-09 10:46:01 +08:00
zeertzjq a45d3dccf1 Merge pull request #41246 from zeertzjq/vim-e0b8113
vim-patch: doc updates
2026-08-09 08:17:43 +08:00
zeertzjqandDoug Kearns 10aa1c975f vim-patch:a33e5da: runtime(doc): Improve :help expr-number
closes: vim/vim#20956

https://github.com/vim/vim/commit/a33e5da9f55a00fbfaef1ec2476fe0dd0758ac1d

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-08-09 08:00:12 +08:00
zeertzjqandBogdan Barbu 05acaa8330 vim-patch:e0b8113: runtime(doc): DocBook syntax variable scopes are not clearly documented
Problem:  DocBook syntax variable scopes of docbk_type and docbk_ver
          are not clearly documented: docbk_type uses the wrong scope
          (it should be buffer-local) and docbk_ver also has an
          undocumented buffer-local version.
Solution: Correct the docbk_type examples and describe the docbk_ver
          precedence.

closes: vim/vim#20977

https://github.com/vim/vim/commit/e0b81136c76a5ab2203eb6f6ece0225f2565e42e

Co-authored-by: Bogdan Barbu <l4b.bogdan.barbu@gmail.com>
2026-08-09 08:00:11 +08:00
zeertzjq 27e36dea19 Merge pull request #41235 from janlazo/vim-8.2.1572
vim-patch:8.2.{1572,1573,1574,1575,1576,1577}
2026-08-08 12:50:25 +08:00
zeertzjqandChristian Brabandt 390e90bba4 vim-patch:9.2.0925: crash when getcompletiontype() gets a NULL string (#41231)
Problem:  Crash when getcompletiontype()/getcompletion() gets a NULL string
          (dvaave2025).
Solution: Do not write the NUL terminator in set_cmd_context() when the
          cursor column is at or past the end of the string, since the
          string may be a read-only literal.

fixes:  vim/vim#20963
closes: vim/vim#20964

Supported by AI.

https://github.com/vim/vim/commit/e2dcefa0d8c03a7d2ebda67207e3d1392ae0c402

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-08-08 09:44:54 +08:00
5d5b8e3e7d vim-patch:9.2.0923: tabpage: closing a tab page loses the alternate tab page (#41229)
Problem:  Closing the current tab page resets the alternate tab page, even
          when that is another tab page which still exists, so that
          CTRL-Tab stops working (igorlfs).
Solution: Restore the last used tab page after entering another one to
          close the current one (Hirohito Higashi).

related: vim/vim#20965
closes:  vim/vim#20973

https://github.com/vim/vim/commit/a05bd64c1dcde65006997efe0ff5ae6b8a9aa382

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 09:30:03 +08:00
zeertzjqandRochish Manda 318d6a7f59 vim-patch:2c0318d: runtime(doc): fix typo in netrw help file (#41228)
closes: vim/vim#20968

https://github.com/vim/vim/commit/2c0318d2854418d26032352ab1152b598642e38a

Co-authored-by: Rochish Manda <28740792+Rochish-Manda@users.noreply.github.com>
2026-08-08 09:26:00 +08:00
zeertzjq 5117b04745 Merge pull request #41207 from zeertzjq/vim-bfc7604
vim-patch: runtime file updates
2026-08-07 12:54:57 +08:00
zeertzjqandBogdan Barbu 9c738cb718 vim-patch:9.2.0920: filetype: json-ld files are not recognized
Problem:  filetype: json-ld files are not recognized
Solution: Detect *.jsonld files as jsonld filetype, include
          filetype, indent and syntax plugins (Bogdan Barbu).

Reference:
https://www.w3.org/TR/json-ld11/

closes: vim/vim#20954

https://github.com/vim/vim/commit/a1e2198a2ca8bbddcad69ade8629f371bcb4cf1f

Co-authored-by: Bogdan Barbu <l4b.bogdan.barbu@gmail.com>
2026-08-07 12:36:41 +08:00
zeertzjqandAliaksei Budavei 925ddb190f vim-patch:90e8cb0: runtime(sh): Fix shFunctionTwo and shFunctionFour definitions for Bash
Claim e.g. "function f () { :; }" as shFunctionTwo while
observing that parentheses after the function name are
optional when the "function" word is used and do not delimit
its body if the latter follows them in "{}" (which should
not be taken for granted with limited backtracking).

closes: vim/vim#20878

https://github.com/vim/vim/commit/90e8cb0094508e9e6932adcf42f5003251c47c26

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2026-08-07 12:35:04 +08:00
ba823836cf vim-patch:bfc7604: runtime(sh): Do not conflate comments and function declarations in Bash
Bash identifiers declared in scripts cannot have a leading
"#" in their names.  And neither "namespace" nor "function"
can be followed by a newline before an identifier.

related: vim/vim#20878

https://github.com/vim/vim/commit/bfc760467864846b5091c5c5768c53b97cc8b5a7

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Co-authored-by: Christoffer Aasted <dezzadk@gmail.com>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-08-07 12:34:54 +08:00
zeertzjq 439c967010 fix(drawline): 'statuscolumn' breaks unprintable char wrapping (#41198)
Problem:
Evaluating 'statuscolumn' overwrites transchar_charbuf[], which breaks
the drawing of an unprintable char if p_extra points there.

Solution:
Make a copy in wlv.extra so that it won't be overwritten.
2026-08-07 04:01:38 +00:00
zeertzjqandBogdan Barbu 139ffd91de vim-patch:8c93e2d: runtime(make): variables in make target lists use wrong highlighting (#41183)
Problem:  Variables in make target lists are highlighted as targets when
          the prerequisite list is non-empty.
Solution: Match target lists separately from prerequisite regions so
          that contained identifiers are highlighted correctly.  Add
          regression test.

closes: vim/vim#20947

https://github.com/vim/vim/commit/8c93e2d50dacabcd66cc4cb9573da497e98d3c26

Co-authored-by: Bogdan Barbu <l4b.bogdan.barbu@gmail.com>
2026-08-06 08:06:25 +08:00
a19dcb3108 vim-patch:9.2.0914: diff: undo after :diffget into an empty buffer leaves a line behind (#41181)
Problem:  After :diffget into an empty buffer, undo does not restore the
          empty buffer, the last line stays behind (Narendran
          Gopalakrishnan)
Solution: Include the empty line of the empty buffer in the undo
          information, it is deleted once the first line was obtained
          (Hirohito Higashi).

fixes:  vim/vim#20950
closes: vim/vim#20951

https://github.com/vim/vim/commit/c44f35ca1a4d8c0c78f327800fe2677c91c6cecb

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-06 07:17:17 +08:00
88c13ee43c vim-patch:9.2.0909: insert completion is slow to collect many matches (#41167)
Problem:  ins_compl_add() checks for a duplicate by scanning the whole
          match list, making collection of N matches quadratic.
Solution: Look matches up in a hashtab instead; each entry counts the
          matches with that string (Samuel Schlesinger).

closes: vim/vim#20926

https://github.com/vim/vim/commit/31b7b1a7da4e282ebdf09f3c1c3e16ded7b76e8a

Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-06 06:36:22 +08:00
zeertzjq 2e3785a702 Merge pull request #41166 from zeertzjq/vim-f620c30
vim-patch: runtime file updates
2026-08-05 07:50:18 +08:00
zeertzjqandBogdan Barbu 743a8d448c vim-patch:5a1124e: runtime(c): compound literal braces are highlighted as errors
Problem: Braces in C compound literals and initializers inside parentheses
         and brackets are highlighted as errors.

Solution: Recognize those initializer blocks while preserving syntax recovery
          for malformed parentheses.

fixes:  vim/vim#18709
closes: vim/vim#20842

https://github.com/vim/vim/commit/5a1124e4f59fafa0c774db956ae1e86bdd259442

Co-authored-by: Bogdan Barbu <l4b.bogdan.barbu@gmail.com>
2026-08-05 07:02:22 +08:00
zeertzjqandChristian Brabandt e795115351 vim-patch:aeac948: runtime: Update Syntax Menus
Update makemenu.vim and re-generate synmenu.vim (using make menu).

closes:  vim/vim#20932
related: vim/vim#20930

https://github.com/vim/vim/commit/aeac948c6273076f666b473862af70e8b7e6c653

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-08-05 07:00:46 +08:00
zeertzjqandDoug Kearns 7fd2c868f7 vim-patch:f620c30: runtime(dart): Update compiler plugins
Use the unified dart command for all.

closes: vim/vim#20936

https://github.com/vim/vim/commit/f620c3001891e6f0abb1c97932af94d021c4e9a0

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-08-05 07:00:46 +08:00
zeertzjq 30b4c1b40d fix(ctx): missing options copy when loading hidden buffer #41149
It's necessary to copy the global 'fileencoding' to the buffer-local
value before entering the buffer, otherwise 'fileencoding' is changed
when reading the file, which will mark the file as modified.
2026-08-04 04:50:36 -04:00
zeertzjqandDoug Kearns 8d2b50c0ce vim-patch:c0da866: runtime: Add TOML entry to the syntax menu (#41145)
fixes:  vim/vim#20927
closes: vim/vim#20930

https://github.com/vim/vim/commit/c0da86685a416c08c90155acbd8aa7cf67103a70

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-08-04 08:41:13 +08:00
zeertzjqandSamuel Schlesinger 6303d3680c vim-patch:9.2.0906: slow transstr() with long strings (#41144)
Problem:  transstr() appends with STRCAT()/STRLEN() from the start of
          the result on every iteration, making it quadratic to the
          length of the string.
Solution: Keep a tail pointer and append at it. (Samuel Schlesinger).

closes: vim/vim#20925

https://github.com/vim/vim/commit/124c86868c253a5ec1347e7cbe102504d2d66a07

Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
2026-08-04 08:40:46 +08:00
zeertzjq 21a0227d2f vim-patch:9.2.0904: "zb" scrolls incorrectly with cursor just above fold (#41143)
Problem:  "zb" scrolls incorrectly with cursor just above fold.
Solution: Handle boff.lnum being set to the last line of a fold
          (zeertzjq).

With the cursor just above fold, botline_forw() moves boff.lnum to the
last line of the fold, but curwin->w_botline is at the first line of the
fold, so the boff.lnum == curwin->w_botline condition never holds.

Instead, check that boff.lnum has just moved to or past w_botline by
comparing its previous value with w_botline.

Also make a similar change to the loff.lnum check above for symmetry.
That one doesn't change behavior, as topline_back() sets loff.lnum to
the first line of a fold.

related: neovim/neovim#41122
closes:  vim/vim#20923

https://github.com/vim/vim/commit/aee686334c2137f8a94b04de130a3f51d928a7ed
2026-08-03 23:43:09 +00:00
zeertzjqandSam Roeca 1f4335fe72 vim-patch:partial:9.2.0899: command output temporary files may collide (#41123)
Problem:  On MS-Windows, get_cmd_output() removes its reserved temporary
          file before the shell opens it, allowing another Vim process to
          reuse the same name.
Solution: Keep the temporary file reserved until command output handling is
          complete (Sam Roeca).

closes: vim/vim#20915

https://github.com/vim/vim/commit/0db0c3c142b9994b64c63162914ba4db528f88a2

Co-authored-by: Sam Roeca <samuel.roeca@gmail.com>
2026-08-03 06:39:00 +08:00
a5a294c825 vim-patch:9.2.0895: test: Test_aucmd_win_scroll_multibyte() is flaky in the GUI (#41121)
Problem:  The test comparing the top line before and after using the
          autocommand window is flaky in the GUI.
Solution: Run the test in a window with a fixed size.  In the GUI a
          pending resize of the shell is applied at the end of a screen
          update, thus the size may change between the two measurements.

related: vim/vim#20884
closes:  vim/vim#20913

https://github.com/vim/vim/commit/85b8034dff60c3631c0cd6fb9c9104610d064659

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03 06:38:43 +08:00
a5103c0853 vim-patch:9.2.0892: highlight: wrong column highlighted with 'cursorcolumn' (#41110)
Problem:  With 'virtualedit' set to "all" and 'cursorcolumn' set, the wrong
          column may be highlighted after a command that moved the cursor
          into virtual space and back (van-de-bugger).
Solution: Make sure the virtual column is up to date before drawing the
          window (Hirohito Higashi).

fixes:  vim/vim#2576
closes: vim/vim#20902

https://github.com/vim/vim/commit/5a90b9dbd2e1915b7aea98813316c7279e5dd27f

Test only. This was already fixed by #39159.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 02:20:11 +00:00
zeertzjqandDoug Kearns e9190e9c4f vim-patch:9.2.0894: filetype: ed script files not recognised (#41109)
Problem:  filetype: ed script files not recognised.
Solution: Add filetype detection for *.ed files and shebang lines,
          include syntax script and syntax tests.

Features of the ed syntax file:
- BSD and GNU extensions are supported
- Andrew L. Moore's ed extensions are not supported
- Rebuild synmenu.vim

closes: vim/vim#19602

https://github.com/vim/vim/commit/c28515b9992e52f49c3fd90484601c248c672aec

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-08-02 09:56:10 +08:00
zeertzjq ad2ae824ec fix(move): using wrong window width (#41108) 2026-08-01 23:18:29 +00:00
zeertzjq 7b28b1f4a9 Merge pull request #41085 from zeertzjq/vim-9.2.0883
vim-patch:9.2.{0883,0884,0885,0887}
2026-08-01 09:36:56 +08:00
86bbe41459 vim-patch:9.2.0885: scroll: 'smoothscroll' position is lost when the window is squeezed
Problem:  With 'smoothscroll' the scroll position in a long line is lost when
          a window is temporarily squeezed to a couple of lines, for example
          when opening and closing a help window.
Solution: When the cursor ends up in the skipped columns, skip up to the
          screen line the cursor is in instead of showing the start of the
          line.

closes: vim/vim#20892

https://github.com/vim/vim/commit/15f8ba5cec35feea22622fbc7c78f3204aad50df

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 08:30:39 +08:00
b08c588238 vim-patch:9.2.0884: scroll: unreachable 'smoothscroll' code in cursor_correct()
Problem:  cursor_correct() checks for 'smoothscroll' with 'wrap' off, a
          combination where 'smoothscroll' has no effect.
Solution: Remove the check, adjust_skipcol() already handles the case where
          the cursor line just fits in the window.

closes: vim/vim#20891

https://github.com/vim/vim/commit/2ea497f072f102220a683822fd201bfb530894b2

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 08:28:56 +08:00
d9525e23f3 vim-patch:9.2.0883: scroll: 'smoothscroll' position is lost when using "|"
Problem:  With 'smoothscroll' the scroll position in a long line is lost when
          moving to a column with "|".
Solution: Adjust the skipped columns for the column the cursor ends up in,
          not for column zero.

related: vim/vim#20885
closes:  vim/vim#20890

https://github.com/vim/vim/commit/5ed8fc10fac461981a729e9cd0995545be64ae46

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 08:27:52 +08:00
zeertzjqandCatsDeservePets f129b5428a vim-patch:e31fb9b: runtime(lf): update syntax to support lf version r42 (#41083)
closes: vim/vim#20897

https://github.com/vim/vim/commit/e31fb9bb67617fc4357cdd075aa16423ced9bbe3

Co-authored-by: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com>
2026-08-01 08:25:29 +08:00
zeertzjq f8872bccbe vim-patch:9.2.0882: :bwipe crashes if WinLeave wipes all other buffers (#41082)
Problem:  :bwipe crashes if WinLeave wipes all other buffers
          (after 9.1.2068).
Solution: Check for NULL pointer.

related: neovim/neovim#41066
closes: vim/vim#20888

https://github.com/vim/vim/commit/3e4019a082701f48bb44de0cc7a92f6a3077bd4e
2026-07-31 23:25:28 +00:00
zeertzjq a35c604718 Merge pull request #41071 from zeertzjq/vim-9.2.0880
vim-patch:9.2.{0880,0881}
2026-07-31 12:23:28 +08:00
f7cc79edf4 vim-patch:9.2.0881: 'smoothscroll' position is lost when the window height changes
Problem:  With 'smoothscroll' the scroll position of a window is lost when
          its height changes.
Solution: Only reset the skipped columns when 'smoothscroll' is off, where
          they just serve to keep the cursor visible.

closes: vim/vim#20885

https://github.com/vim/vim/commit/17f3923b8c8bacf5785e7721108d39705dc3179c

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 11:22:27 +08:00
f9040dbe03 vim-patch:9.2.0880: scroll: window scrolls when using the autocommand window
Problem:  The window scrolls when an autocommand window is used while the
          cursor is behind multi-byte characters.
Solution: Use the byte column instead of the character count when computing
          how many screen lines the text up to the cursor takes.

fixes:  vim/vim#12085
closes: vim/vim#20884

https://github.com/vim/vim/commit/7fe3ea7658a1f3be4e07dee14041302ca129c8a9

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 11:22:26 +08:00
zeertzjq 9d7c004ade Merge pull request #41069 from zeertzjq/vim-b0e0b22
vim-patch: runtime file updates
2026-07-31 10:48:46 +08:00
zeertzjqandChristian Brabandt 41378d4610 vim-patch:e241ac0: runtime(zip): fix failure on Windows CI
Problem:  The zip autoload script aborts loading when the "zip"
          command is not available, so even read-only browsing of an
          archive fails with E117 (zip#Browse undefined) on systems
          that have "unzip" but not "zip" (e.g. the Windows CI
          runner).  Regressed in b0e0b22.
Solution: Drop the load-time executable gate and check each command
          per operation instead, so a missing "zip" only affects
          writing.  Update the test to match the reworded message.

https://github.com/vim/vim/commit/e241ac0a62b774763733f2ccac4040dfe8aafac8

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-31 09:32:40 +08:00
zeertzjqandBrian Carbone 659259d736 vim-patch:99921ff: runtime(marko): improve syntax highlighting
closes: vim/vim#20874

https://github.com/vim/vim/commit/99921ffc39591f7163d015dec43b29ae30a4462b

Co-authored-by: Brian Carbone <brian@briancarbone.com>
2026-07-31 09:28:56 +08:00
zeertzjqandcurbe454 0e3e15d161 vim-patch:b0e0b22: runtime(zip): Improve Compatibility for powershell 5 and pwsh 7
related: vim/vim#20832

https://github.com/vim/vim/commit/b0e0b22535079e478c3acfb47a61709c3c59ff2d

Co-authored-by: curbe454 <asu454@outlook.com>
Co-Authored-By: curbe454 <asu454@outlook.com>
2026-07-31 09:28:28 +08:00
zeertzjqandChristian Brabandt a85cce90e3 vim-patch:partial:b4ae16c: runtime(doc): clarify 'laststatus' effect (#41052)
fixes: vim/vim#20875

https://github.com/vim/vim/commit/b4ae16ca3ed558e4b2da28bbb05c15fb4fdcd4eb

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-30 00:11:46 +00:00
d93684023f vim-patch:9.2.0871: screen line is lost when splitting a 'winfixheight' window (#41054)
Problem:  When the only window has 'winfixheight' set and 'laststatus'
          is one, splitting it leaves one screen line unused.  This
          happens for example when jumping to an item from a maximized
          quickfix window (rendcrx)
Solution: Do not subtract the height of the status line twice
          (Hirohito Higashi)

fixes:  vim/vim#20495
closes: vim/vim#20871

https://github.com/vim/vim/commit/ab36bcc870f47a96c00602bd50bdf1aeb09e71da

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 23:12:10 +00:00
zeertzjqandPatrick Meiser-Knosowski 943df84fb6 vim-patch:f26970c: runtime(karel): improve indent plugin (#41053)
closes: vim/vim#20873

https://github.com/vim/vim/commit/f26970ce56f73a7770aa74a9c84f9ddd5ba84e6f

Co-authored-by: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
2026-07-29 22:59:15 +00:00
9a4b38584c vim-patch:9.2.0874: fold size is compared against 'foldminlines' of the wrong window (#41051)
Problem:  checkSmall() compares the fold size of window "wp" against
          the current window's 'foldminlines'.  A fold of another
          window, e.g. measured while it is redrawn, is judged by an
          unrelated option value.
Solution: Use 'foldminlines' of the window containing the fold
          (Igor Mikushkin).

closes: vim/vim#20864

https://github.com/vim/vim/commit/773dc19f145744d65e0e920df57e6e3d33fd4591

Co-authored-by: Igor Mikushkin <igor.mikushkin@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-07-29 22:19:12 +00:00
zeertzjqandChristian Brabandt 7b7a21bd2a vim-patch:9.2.0869: buf_copy_options() can lose the P_INSECURE flag (#41040)
Problem:  An insecurely-set 'indentexpr', 'formatexpr', 'includeexpr'
          or 'complete' value can end up evaluated outside the
          sandbox after buf_copy_options() and clears the flag.
Solution: Copy the insecure flag alongside the value in
          buf_copy_options(), and make 'complete' a per-buffer
          insecure-flags field

Supported by AI.

closes: vim/vim#20861

https://github.com/vim/vim/commit/35f7fdfdfb036028cc8760d7c1556361bb85206a

I'm a bit hesitant to port this, but it's a follow-up to #39452.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-29 17:44:51 +08:00
zeertzjqandBrian Carbone 1eba3a75da vim-patch:9.2.0870: filetype: marko files are not recognized (#41038)
Problem:  filetype: marko files are not recognized
Solution: Detect *.marko files as marko filetype, include a syntax
          plugin and add syntax tests (Brian Carbone)

References:
https://markojs.com
https://github.com/marko-js/tree-sitter
https://github.com/marko-js/language-server
https://v5.markojs.com/docs/editor-plugins/

closes: vim/vim#20863

https://github.com/vim/vim/commit/95da62a910809787cc8fdf26b131721359812d8f

Co-authored-by: Brian Carbone <brian@briancarbone.com>
2026-07-29 09:14:48 +08:00
zeertzjqandSam Williams a8626466e8 vim-patch:70d55cd: runtime(m4): Prevent the m4Disabled region from nesting within itself. (#41037)
closes: vim/vim#20801

https://github.com/vim/vim/commit/70d55cd5162b03e5a058907b30bc96d544fc0594

Co-authored-by: Sam Williams <sam@badcow.co>
2026-07-29 09:14:14 +08:00
zeertzjq 205a1ce4c7 test(old): map gQ to 1q: (#41025) 2026-07-28 18:11:42 +08:00
zeertzjqandWu, Zhenyu <wuzhenyu@ustc.edu> 5745ea93f1 vim-patch:9.2.0860: filetype: xilinx design constraint files are not recognized (#41024)
Problem:  filetype: xilinx design constraint files are not recognized
Solution: Detect *.xdc files as tcl filetype (Wu, Zhenyu)

Reference:
https://docs.amd.com/r/en-US/ug903-vivado-using-constraints/About-XDC-Constraints

closes: vim/vim#20853

https://github.com/vim/vim/commit/247a4cb45e5d9b03e4cb0bbf1eddd0538471649d

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2026-07-28 18:11:29 +08:00
zeertzjq 7f8175dc48 Merge pull request #41003 from zeertzjq/vim-f88e719
vim-patch: runtime file updates
2026-07-27 06:47:21 +08:00
zeertzjqandJon Parise 1c83e43f27 vim-patch:916809a: runtime(python): highlight the 'lazy' soft keyword
Lazy imports (PEP 810, to be released in Python 3.15) introduces a
`lazy` soft keyword that's recognized when it precedes a `from` or
`import` keyword.

closes: vim/vim#20342

https://github.com/vim/vim/commit/916809ae1e3e562e0a6220a6e7e08f38b8a23b62

Co-authored-by: Jon Parise <jon@indelible.org>
2026-07-27 06:31:58 +08:00
zeertzjqandqwavies 1d36cf1dbe vim-patch:f88e719: runtime(python): Fix indenting for brackets within python byte strings
Problem:  s:SearchBracket()'s skip-expression matches syntax group
          names ending in "Comment", "Todo", or "String" to decide
          whether a candidate bracket is inside a string/comment
          and should be skipped for indentation purposes. Byte and
          raw-byte string literals (b"...", rb"...") are highlighted
          via the pythonBytes/pythonRawBytes syntax groups, which
          don't end in "String", so brackets inside them (e.g.
          b"[") were never skipped and were counted as real,
          unmatched brackets, producing incorrect indentation.

Solution: Add "Bytes" to the indent script's existing suffix match,
          so pythonBytes/pythonRawBytes are recognized directly, the
          same way pythonString/pythonFString/pythonRawString
          already are.

          This supersedes an earlier version of this fix that
          renamed pythonBytes/pythonRawBytes to
          pythonBytesString/pythonRawBytesString in
          runtime/syntax/python.vim.

fixes:  vim/vim#20812
closes: vim/vim#20827

https://github.com/vim/vim/commit/f88e7191da1a03b2e79a2ba5fbc26f4948bcca81

Co-authored-by: qwavies <qwavsbusiness@gmail.com>
2026-07-27 06:31:40 +08:00
zeertzjqandAliaksei Budavei ef93e93958 vim-patch:4e3df44: runtime(indent-tests): Annotate timed "search*()"es for tracing
related: vim/vim#17116

https://github.com/vim/vim/commit/4e3df44aa2a4f99c3c35e11371f7f1b2b6207558

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2026-07-27 06:31:33 +08:00
zeertzjq d57cf6b4fc Merge pull request #40982 from zeertzjq/vim-e2d3e78
vim-patch: runtime file updates
2026-07-26 09:59:03 +08:00
zeertzjqandfrapank 11cad372ef vim-patch:fb1a2e9: runtime(sh): fix Bash/Ksh array highlighting after an escaped paren
fixes:  vim/vim#18712
closes: vim/vim#20705

https://github.com/vim/vim/commit/fb1a2e9d13f21fadec7ef4aef2fb6e760036daf0

Co-authored-by: frapank <francesco.pankov+github@proton.me>
2026-07-26 09:02:02 +08:00
zeertzjqandHirohito Higashi 43b666cb27 vim-patch:770eb7d: runtime(doc): clarify expandcmd() and "~" behaviour
fixes: vim/vim#20793

https://github.com/vim/vim/commit/770eb7db17c44e41fc4eb1975d67f9ec022edb58

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-07-26 09:01:32 +08:00
zeertzjqandChristian Brabandt a7bab6121b vim-patch:e2d3e78: runtime(doc): remove incorrect note about spellcapcheck and the first word
'spellcapcheck' checks the first word in the file for a capital like any
sentence start: capcol is seeded to 0 for line 1 in spell_check_sblock().

This has been the case since the feature was added in v7.0100, so the note
that it "doesn't work for the first word in the file" is incorrect.

related: f9184a1d3151b5b727fec86c2ac0946c9c68df4d (code change)
related: 0d9c26dd8333aae4b20015f13fe2e8e1f07037bd (initial doc patch,
         just a few minutes later)
related: vim/vim#20715

https://github.com/vim/vim/commit/e2d3e7818b0f408ad25ff97b86d6179c303c98d7

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-26 09:00:30 +08:00
zeertzjq e5aac37eb3 Merge pull request #40977 from zeertzjq/vim-9.2.0806
vim-patch:9.2.{partial:0806,0855}
2026-07-26 07:49:47 +08:00
zeertzjq 7ee1bf91ad vim-patch:9.2.0855: 'showcmd' not redrawn with empty mapping triggered on timeout
Problem:  'showcmd' not redrawn with empty mapping triggered on timeout.
Solution: Don't postpone redraw when inside vgetorpeek(). Also move test
          for tabline 'showcmd' to test_tabline.vim.

fixes:  vim/vim#20839
closes: vim/vim#20840

https://github.com/vim/vim/commit/2e9687647a2ab2aadee00f01e37c71a5cffbdfcc
2026-07-26 07:07:38 +08:00
zeertzjqandBarrett Ruth a56f4d221e vim-patch:partial:9.2.0806: 'showcmd' may show internal command keys
Problem:  The `showcmd` statusline item may show internal command keys when a
          `<Cmd>` or `<ScriptCmd>` mapping redraws the statusline, and may
          leave stale text behind when `%S` is rendered directly.
Solution: Do not add these internal mapping dispatch keys to the `showcmd`
          buffer, and keep the clear state in sync when `%S` renders it
          (Barrett Ruth)

closes: vim/vim#20769

https://github.com/vim/vim/commit/bd730293dccaa166cd99321be674cb059d498b73

Co-authored-by: Barrett Ruth <br@barrettruth.com>
2026-07-26 07:07:35 +08:00
zeertzjq 20a3bb3325 Merge pull request #40952 from zeertzjq/vim-9.2.0846
vim-patch:9.2.{0846,0854}
2026-07-25 08:25:58 +08:00
zeertzjqandChristian Brabandt 89cab37358 vim-patch:9.2.0854: memory leak when reading a spell file with SN_SAL and SN_SOFO
Problem:  Memory leak when a spell file has an SN_SAL section before an
          SN_SOFO section: set_sofo() reuses sl_sal without freeing the
          salitem_T entries left by read_sal_section() (after v9.2.0846).
Solution: Factor the SAL free loop into free_sal_items() and call it
          before set_sofo() reuses sl_sal.

closes:  vim/vim#20836

Supported by AI.

https://github.com/vim/vim/commit/5a7ce2733a2d9d9fccad4dd48047546000d9994d

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-25 07:07:43 +08:00
zeertzjqandYasuhiro Matsumoto ba0e5b25bc vim-patch:9.2.0846: [security]: heap buffer overflow in set_sofo()
Problem:  [security]: heap buffer overflow in set_sofo()
          (Yazan Balawneh)
Solution: Reset sl_sal_first (Yasuhiro Matsumoto).

A crafted spell file with an empty SN_SAL section before an SN_SOFO
section reaches set_sofo() with sl_sal_first[] already set to -1 by
set_sal_first(). The counting loop then under-counts colliding
multi-byte "from" characters, allocates an undersized list and writes
past its end.

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-9jqx-hgpr-6v64

https://github.com/vim/vim/commit/05c41c922309c7a11b6ec2f124be66551c90d66a

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-07-25 07:07:43 +08:00
63c84e4c1a vim-patch:9.2.0848: tagfunc "cmd" with a generic Ex command corrupts the tag entry (#40951)
Problem:  When a tagfunc returns a "cmd" that is neither a line number nor
          a search pattern, the tag entry is corrupted: the "kind" field is
          lost and taglist() returns a mangled "cmd".
Solution: Accept any Ex command in "cmd" as in a tags file, terminate a
          generic command with a bar so the trailing fields are preserved,
          and reject a value that cannot be stored in a tag line with E987
          (Hirohito Higashi).

fixes:   vim/vim#20781
related: vim/vim#20790
closes:  vim/vim#20828

https://github.com/vim/vim/commit/86adef19fc2f1d59a38f3ba978ce33f0b4329c0f

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2026-07-25 07:07:22 +08:00
zeertzjq 0e1a24836d Merge pull request #40950 from zeertzjq/vim-9.2.0845
vim-patch: runtime file updates
2026-07-25 06:56:32 +08:00
zeertzjqandChristian Brabandt db41e4c74f vim-patch:0c1a214: runtime(doc): Fix truncated sentence in :h map()
fixes: vim/vim#20725

https://github.com/vim/vim/commit/0c1a214497400a950f1e25f4163215ec930a4659

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-25 06:32:03 +08:00
zeertzjqandFionn Fitzmaurice 19c89b6d68 vim-patch:9.2.0849: filetype: osquery config files are not recognized
Problem:  filetype: osquery config files are not recognized.
Solution: Detect osquery.conf as jsonc filetype (Fionn Fitzmaurice).

Reference:
https://osquery.readthedocs.io/en/stable/deployment/configuration/#configuration-components

closes: vim/vim#20826

https://github.com/vim/vim/commit/ea183ce4e5fb82d389e71f5de8f7564ee399d49c

Co-authored-by: Fionn Fitzmaurice <fionn@github.com>
2026-07-25 06:29:04 +08:00
zeertzjqandAndrey Starodoubtsev 2fb28fdcb6 vim-patch:e298a57: runtime(iar): Add iar compiler plugin
closes: vim/vim#20830

https://github.com/vim/vim/commit/e298a5735310bfa976bc0f10fae358f1d07408fd

Co-authored-by: Andrey Starodoubtsev <andrey.starodoubtsev@gehealthcare.com>
2026-07-25 06:26:55 +08:00
zeertzjqandBillie Cleek 77b0476f40 vim-patch:e9234b9: runtime(go): update Go syntax file
Update the Go syntax file with some recent changes made to vim-go to
correctly highlight the second and later lines of concatenated strings
in var or const blocks.

closes: vim/vim#20835

https://github.com/vim/vim/commit/e9234b9b4ae658d1de4a3f785a2aac531d77f903

Co-authored-by: Billie Cleek <bhcleek@gmail.com>
2026-07-25 06:26:41 +08:00
zeertzjqandYasuhiro Matsumoto 72b2c713ea vim-patch:9.2.0845: [security]: arbitrary Ex command execution during C omni-completion
Problem:  [security]: arbitrary Ex command execution during C
          omni-completion (Threonine)
Solution: Match tags typeref literally to block Ex command injection
          (Yasuhiro Matsumoto).

Escaping only "/" and "\" left the typeref able to break out of the
:vimgrep pattern without a "/": an unclosed "[" makes vimgrep's pattern
skipping fail, and the parser then treats a following "|" as a command
separator, so the tag value runs as Ex commands during C omni-completion.
Match the field literally with \V so no regex metacharacter can affect
pattern parsing.

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-cx73-phcg-3j5g

https://github.com/vim/vim/commit/2f628d8104958fa7421664f792ca6d4f7a39a10f

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-07-25 06:23:13 +08:00
zeertzjq e4137a7324 Merge pull request #40931 from zeertzjq/vim-9.2.0839
vim-patch:9.2.{0839,0840}
2026-07-24 08:56:14 +08:00
zeertzjqandYasuhiro Matsumoto 8d1f8d8dc3 vim-patch:9.2.0840: [security]: code injection in netrw via bookmarks
Problem:  [security]: code injection in netrw via bookmarks and history
          (David Carliez)
Solution: Escape the '|' explicitly (Yasuhiro Matsumoto)

The bookmark and history menu builders interpolate paths into :execute'd
:menu commands using g:netrw_menu_escape, which did not escape the Ex
command separator '|'. A crafted path could break out of the :menu command
and run arbitrary Ex/shell commands when the menu was built or triggered.

Add '|' to g:netrw_menu_escape for the menu names, escape the :e right-hand
side with fnameescape(), and quote the netrw#MakeTgt() argument with
string() instead of raw single-quote interpolation.

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-rcr7-f3wr-22r2

https://github.com/vim/vim/commit/29c6fd090d4520592f8be7d9ec81190edf25ef69

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-07-24 08:14:20 +08:00
zeertzjqandYasuhiro Matsumoto 0a8d881537 vim-patch:9.2.0839: [security]: arbitrary code execution via keyword lookup
Problem:  [security]: arbitrary code execution via keyword lookup in
          sh.vim, zsh.vim and ps1.vim filetype plugin
          (manus-use)
Solution: For powershell, quote the commands using single quotes, for
          sh/zsh pass the argument as a separate list item to term_start()/system()
          (Yasuhiro Matsumoto).

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-r5v6-q6j8-8qw2

https://github.com/vim/vim/commit/c5a82fe013e73c98004ad7cd4f906b1ad1ed610e

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-07-24 08:14:04 +08:00
b81c60c3fa vim-patch:9.2.0830: the completion menu is not used on terminals without colors (#40917)
Problem:  When the terminal reports no colors ("t_Co" is 0 or 1) the
          insert mode completion popup menu is not shown at all, while
          the command line completion popup menu ('wildoptions' contains
          "pum") is shown.  In 'wildmenu' completion the current match
          cannot be told apart from the other matches (Maxim Kim)
Solution: Show the insert mode completion popup menu regardless of the
          number of colors and add "term" attributes to the default
          highlighting of Pmenu, PmenuSel and PmenuThumb.  The wildmenu
          is drawn with the attributes of the status line, which is
          reversed, and on most terminals the standout mode is the same
          as the reverse mode, thus use the underline mode for the
          default highlighting of WildMenu (Hirohito Higashi).

fixes:  vim/vim#20800
closes: vim/vim#20803

https://github.com/vim/vim/commit/52485e0d24ade45e02ecba9aeadaec66500d15fe

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 07:40:11 +00:00
zeertzjqandglepnir 53cbf66bd2 vim-patch:9.2.0838: searchcount() returns wrong cached maxcount (#40913)
Problem:  Cached searchcount() returns 'maxsearchcount' instead of the
          requested maxcount.
Solution: return the remembered last_maxcount (glepnir)

closes: vim/vim#20701

https://github.com/vim/vim/commit/4352dc6ab0ca60d3a44fc90a26275d722ce7b86c

Co-authored-by: glepnir <glephunter@gmail.com>
2026-07-23 09:03:29 +08:00