1972 Commits

Author SHA1 Message Date
zeertzjq
6dfcb2b784 vim-patch:9.2.0237: filetype: ObjectScript routines are not recognized (#38479)
Problem:  filetype: ObjectScript routines are not recognized
Solution: Add ObjectScript routines detection for .mac, .int, and .inc
          files (Hannah Kimura)

Reference:
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GORIENT_ch_intro#GORIENT_intro_routines

closes: vim/vim#19805

25f6539645

Co-authored-by: Hannah Kimura <hannah.kimura@intersystems.com>
2026-03-25 01:02:04 +00:00
zeertzjq
f806c77391 vim-patch:9.2.0239: signcolumn may cause flicker (#38477)
Problem:  Changing the 'signcolumn' may cause flicker, because it uses
          the P_RCLR flag for redrawing (Yggdroot)
Solution: Change 'signcolumn' to use P_RWIN instead of P_RCLR, matching
          the behavior of 'number' and 'foldcolumn'
          (Yasuhiro Matsumoto).

fixes:  vim/vim#19663
closes: vim/vim#19713

4292eea714

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-03-25 08:19:42 +08:00
Anakin Childerhose
1de1c08210 vim-patch:9.2.0235: filetype: wks files are not recognized (#38451)
Problem:  filetype: wks files are not recognized.
Solution: Detect *.wks, *.wks.in and *.wks.inc as wks filetype,
          include a filetype and syntax plugin (Anakin Childerhose)

The OpenEmbedded Image Creation tool, `wic` uses wic kickstarter files
to define image partition and bootloader layouts.
wks files can end with .wks, .wks.in for templated wks files, and
.wks.inc for including in other .wks files.

The autocmd for *.wks.inc needs to come before *.inc in
runtime/ftdetect.vim

Reference:
https://docs.yoctoproject.org/ref-manual/kickstart.html#openembedded-kickstart-wks-reference
https://git.openembedded.org/openembedded-core/tree/scripts/lib/wic/canned-wks

closes: vim/vim#19796

8c116bbe79
2026-03-23 23:40:03 +00:00
zeertzjq
e51f217be7 vim-patch:9.2.0223: Option handling for key:value suboptions is limited (#38426)
Problem:  Option handling for key:value suboptions is limited
Solution: Improve :set+=, :set-= and :set^= for options that use
          "key:value" pairs (Hirohito Higashi)

For comma-separated options with P_COLON (e.g., diffopt, listchars,
fillchars), :set += -= ^= now processes each comma-separated item
individually instead of treating the whole value as a single string.

For :set += and :set ^=:
- A "key:value" item where the key already exists with a different value:
  the old item is replaced.
- An exact duplicate item is left unchanged.
- A new item is appended (+=) or prepended (^=).

For :set -=:
- A "key:value" or "key:" item removes by key match regardless of value.
- A non-colon item removes by exact match.

This also handles multiple non-colon items (e.g., :set
diffopt-=filler,internal) by processing each item individually, making
the behavior order-independent.

Previously, :set += simply appended the value, causing duplicate keys to
accumulate.

fixes:  vim/vim#18495
closes: vim/vim#19783

e2f4e18437

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:13:48 +08:00
zeertzjq
fae782557c vim-patch:9.2.0226: No 'incsearch' highlighting support for :uniq (#38425)
Problem:  No 'incsearch' highlighting support for :uniq
Solution: Add :uniq support (Hirohito Higashi)

closes: vim/vim#19780

48137e4e48

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-03-23 09:38:48 +08:00
zeertzjq
6cd1fe9a66 vim-patch:9.2.0225: runtime(compiler): No compiler plugin for just (#38424)
Problem:  runtime(compiler): No compiler plugin for just
Solution: Add a compiler plugin for the just command runner, add a test
          (Aditya Malik)

Sets makeprg and a custom errorformat to parse just's multi-line
error output into quickfix entries with file, line, column, and
message. Includes a test.

Reference:
- https://github.com/casey/just

closes: vim/vim#19773

e147b635fc

Co-authored-by: Aditya Malik <adityamalik2833@gmail.com>
2026-03-22 23:14:49 +00:00
zeertzjq
11b9ec38d2 vim-patch:9.2.0222: "zb" scrolls incorrectly with cursor on fold (#38423)
Problem:  "zb" scrolls incorrectly with cursor on fold.
Solution: Set w_botline to the line below the fold (zeertzjq).

related: neovim/neovim#38413
closes:  vim/vim#19785

5a3b75d67b
2026-03-23 07:12:08 +08:00
zeertzjq
0655a359ae vim-patch:9.2.0217: filetype: cto files are not recognized (#38400)
Problem:  filetype: cto files are not recognized
Solution: Detect *.cto as concerto filetype (Jamie Shorten)

Add filetype detection for the Concerto Modelling Language. Concerto
is a schema language by the Accord Project for defining data models
used in smart legal contracts and business networks.

Reference:
Language spec: https://concerto.accordproject.org
Tree-sitter grammar: https://github.com/accordproject/concerto-tree-sitter

closes: vim/vim#19760

68f9dedba4

Co-authored-by: Jamie Shorten <jamie@jamieshorten.com>
2026-03-21 08:50:15 +08:00
zeertzjq
d36e7787c1 vim-patch:9.2.0209: freeze during wildmenu completion (#38386)
Problem:  Vim may freeze if setcmdline() is called while the wildmenu or
          cmdline popup menu is active (rendcrx)
Solution: Cleanup completion state if cmdbuff_replaced flag has been set
          (Yasuhiro Matsumoto)

fixes:  vim/vim#19742
closes: vim/vim#19744

332dd22ed4

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-03-20 08:44:01 +08:00
zeertzjq
a18d51a958 vim-patch:9.2.0204: filetype: cps files are not recognized
Problem:  filetype: cps files are not recognized
Solution: Detect *.cps files as json filetype (Guillaume Barbier).

Reference:
https://github.com/cps-org/cps
https://cps-org.github.io/cps/

closes: vim/vim#19758

53884ba7a8

Co-authored-by: Guillaume Barbier <barbier.guillaume60@gmail.com>
2026-03-20 08:17:18 +08:00
zeertzjq
e2c3106b85 vim-patch:9.2.0201: filetype: Wireguard config files not recognized
Problem:  filetype: Wireguard config files not recognized
Solution: Detect /etc/wireguard/*.conf files as dosini filetype
          (Furkan Sahin).

closes: vim/vim#19751

cc8798e719

Co-authored-by: Furkan Sahin <furkan-dev@proton.me>
2026-03-20 08:17:18 +08:00
zeertzjq
9ab6c607cc vim-patch:9.2.0180: possible crash with winminheight=0 (#38335)
Problem:  possible crash with winminheight=0
          (Emilien Breton)
Solution: Use <= instead of < when checking reserved room in
          frame_setheight() to correctly handle the zero-height
          boundary case (Hirohito Higashi).

In frame_setheight(), when shrinking the current window and the only
other window has 'winfixheight' with 'winminheight'=0, room_reserved
was not cleared because the condition used '<' instead of '<='.
The freed rows were discarded, leaving fr_height sum less than
topframe fr_height.  Subsequent resize operations then computed a
wrong room_cmdline that expanded topframe beyond the screen, causing
a crash.

fixes:  vim/vim#19706
closes: vim/vim#19712

a5d9654620

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-03-17 00:02:32 +00:00
Sean Dewar
33b357d01f vim-patch:9.2.0182: autocmds may leave windows with w_locked set #38332
Problem:  autocmds that switch windows may cause them to remain with
          w_locked set, preventing them from being closed longer than
          intended.
Solution: Unset w_locked in the window where it was set (Sean Dewar).

closes: vim/vim#19716

bae31c35bb

Also move alist_add_list's ga_grow inside the if block, so it's only called when
check_arglist_locked is OK, like Vim.

I also notice a redundant return at the end of the block; could be useful if
more code is added later, so I'm leaving it.
2026-03-16 23:05:39 +00:00
Shadman
7b7e8cc724 feat(progress): disable cmdline progress msg via messagesopt' #36730
Problem:
No way to disable progress messages in cmdline message area. If
a third-party plugin handles Progress events + messages, the user may
not want the "redundant" progress displayed in the cmdline message area.

Solution:
Support "progress:c" entry in 'messageopts' option.
2026-03-16 11:29:47 -04:00
Justin M. Keyes
c82f83abb0 fix(ux): drop "Sorry" from messages #38318
Problem:
"Sorry" in a message (1) is noise, and (2) actually reduces the clarity
of the message because the titlecasing of "Sorry" distracts from the
actually important part of the message.

Solution:
Drop "Sorry" from messages.
2026-03-16 07:46:34 -04:00
Yinzuo Jiang
6dd634b025 vim-patch:9.2.0143: termdebug: no support for thread and condition in :Break
Problem:  termdebug :Break does not support `thread` and `if` arguments
Solution: extend :Break and :Tbreak to accept optional location, thread
          {nr}, and if {expr} arguments (Yinzuo Jiang).

closes: vim/vim#19613

5890ea5397

AI-assisted: Codex
2026-03-16 19:05:15 +08:00
zeertzjq
9d025e6a4d test(old): avoid indexing undefined signs
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2026-03-16 19:05:15 +08:00
Yinzuo Jiang
42640c62d1 vim-patch:partial:9.1.1004: tests: a few termdebug tests are flaky
Problem:  tests: a few termdebug tests are flaky; test_termdebug_basic()
          and test_termdebug_config_types() may fail if there is too
          much load
Solution: Set g:test_is_flaky

Only include:
- mark Test_termdebug_basic() as flaky in oldtest termdebug plugin tests

The Test_termdebug_config_types() part does not apply here.

ebb08d5913

Co-authored-by: Christian Brabandt <cb@256bit.org>
AI-assisted: Codex
2026-03-16 19:05:15 +08:00
Yinzuo Jiang
dff515205c vim-patch:partial:9.1.0613: tests: termdebug test may fail and leave file around
Problem:  tests: termdebug test may fail and leave temp file around
          (Dominique Pellé)
Solution: only run balloon_show() if the function exists, validate
          termdebug is running using the g: termdebug_is_running var,
          use defer to delete temporary files

Only include:
- guard balloon_show() in the termdebug plugin
- wait for g:termdebug_is_running in Test_termdebug_basic()

The remaining upstream test cleanups do not apply here.

fixes: vim/vim#15334

2979cfc262

Co-authored-by: Christian Brabandt <cb@256bit.org>
AI-assisted: Codex
2026-03-16 19:05:15 +08:00
Justin M. Keyes
16f7440cc7 feat(help): super K (":help!") guesses tag at cursor #36205
Problem:
`K` in help files may fail in some noisy text. Example:

      (`fun(config: vim.lsp.ClientConfig): boolean`)
                            ^cursor

Solution:
- `:help!` (bang, no args) activates DWIM behavior: tries `<cWORD>`,
  then trims punctuation until a valid tag is found.
- Set `keywordprg=:help!` by default.
- Does not affect `CTRL-]`, that is still fully "tags" based.
2026-03-15 19:02:49 -04:00
zeertzjq
0082cd3134 vim-patch:9.2.0165: tests: perleval fails in the sandbox
Problem:  tests: perleval fails in the sandbox
          (after v9.2.0156)
Solution: Update tests and assert that it fails

related: vim/vim#19676

3f89324b3a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-15 06:31:26 +08:00
zeertzjq
1aaa8e8e3a vim-patch:9.2.0162: tests: unnecessary CheckRunVimInTerminal in test_quickfix
Problem:  tests: unnecessary CheckRunVimInTerminal in test_quickfix.vim
          (after v9.2.0159)
Solution: Remove it (zeertzjq).

closes: vim/vim#19671

81d5329ace
2026-03-15 06:28:47 +08:00
zeertzjq
80684a418b vim-patch:9.2.0159: Crash when reading quickfix line
Problem:  Crash when reading quickfix line (Kaiyu Xie)
Solution: Make sure line is terminated by NUL

closes: vim/vim#19667

Supported by AI

8d13b8244a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-15 06:26:53 +08:00
zeertzjq
f58d24040a vim-patch:9.2.0155: filetype: ObjectScript are not recognized (#38288)
Problem:  filetype: ObjectScript are not recognized
Solution: Add ObjectScript filetype detection for *.cls files
          (Hannah Kimura)).

Reference:
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCOS_intro

closes: vim/vim#19668

b11c8efbe6

Co-authored-by: Hannah <hannah.kimura@intersystems.com>
2026-03-14 01:42:10 +00:00
zeertzjq
e5667b9c15 vim-patch:9.2.0137: [security]: crash with composing char in collection range (#38261)
Problem:  Using a composing character as the end of a range inside a
          collection may corrupt the NFA postfix stack
          (Nathan Mills, after v9.1.0011)
Solution: When a character is used as the endpoint of a range, do not emit
          its composing characters separately. Range handling only uses
          the base codepoint.

supported by AI

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-9phh-423r-778r

36d6e87542

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-11 23:42:31 +00:00
zeertzjq
3a7ade847f vim-patch:9.2.0132: tests: Test_recover_corrupted_swap_file1 fails on be systems (#38238)
Problem:  tests: Test_recover_corrupted_swap_file1 fails on big-ending
          systems (after v9.2.0077)
Solution: Skip the test on big-endian systems (James McCoy)

The POC files were generated on 64-bit little-endian systems and
therefore are not portable to any other system type.

Extract the 64-bit / endianness detection from
Test_recover_corrupted_swap_file() into a SetUp() function and use that
data to determine if the test should be run.

closes: vim/vim#19620

ff16ebdb08

Co-authored-by: James McCoy <jamessan@debian.org>
2026-03-11 07:48:36 +08:00
Daniel Müller
61f166ec40 fix(textformat): don't swallow "space" with auto-formatting enabled (#38181)
vim-patch:9.2.0124: auto-format may swallow white space

Problem:  With auto paragraph formatting enabled, when a user makes an
          attempt to add a new word before the end of a line and with
          the following space bringing the line width over 'textwidth',
          the space ends up just getting swallowed by the editor.
Solution: Detect such a constellation and do not auto-format in that
          case (Daniel Müller).

closes: vim/vim#19593

24fd698045
2026-03-08 23:58:14 +00:00
zeertzjq
f21c56da84 vim-patch:9.2.0125: tests: test_textformat.vim leaves swapfiles behind
Problem:  tests: test_textformat.vim leaves swapfiles behind
Solution: Close open buffer using :bw! instead of :close!

271f4fe47b

N/A patches:
vim-patch:9.2.0122: Vim still supports compiling on NeXTSTEP
vim-patch:bab7619: runtime(doc): Update intro.txt about Neovim

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-09 07:05:47 +08:00
zeertzjq
f1e65bde02 vim-patch:9.2.0120: tests: test_normal fails
Problem:  tests: test_normal fails
Solution: Ensure the terminal width is 40 columns and also
          check for existence of the tr.mo file

closes: vim/vim#19608

123a1e6410

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-09 07:05:47 +08:00
zeertzjq
504327020d vim-patch:9.1.1484: tests: Turkish locale tests fails on Mac
Problem:  tests: Turkish locale tests fails on Mac
          (after v9.1.1480)
Solution: skip the test Test_pos_percentage_in_turkish_locale() on Mac

223189389a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-09 07:05:46 +08:00
zeertzjq
6ddcc84a6c vim-patch:9.2.0102: 'listchars' "leadtab" not used in :list (#38142)
Problem:  'listchars' "leadtab" not used in :list (after 9.2.0088).
Solution: Also check for "leadtab" when using :list. Fix memory leak on
          E1572 if "multispace" or "leadmultispace" is set (zeertzjq).

closes: vim/vim#19557

5845741d69
2026-03-03 23:42:05 +00:00
zeertzjq
518aa46158 vim-patch:9.2.0090: "leadtab" behavior inconsistent on line with only TABs
Problem:  "leadtab" behavior inconsistent on line with only TABs
          (after 9.2.0088).
Solution: Don't consider those as leading TABs. Also add more tests for
          existing behavior of "lead" and "leadmultispace" (zeertzjq).

closes: vim/vim#19549

4b30e40a1f
2026-03-03 08:08:20 +08:00
zeertzjq
3e81072293 vim-patch:9.2.0088: cannot display tabs for indentation
Problem:  cannot display tabs for indentation
Solution: Add the "leadtab" value to the 'listchars' option to
          distinguish between tabs used for indentation and tabs used
          for alignment (HarshK97).

closes: vim/vim#19094

8526d32647

Co-authored-by: HarshK97 <harshkapse1234@gmail.com>
2026-03-03 08:05:58 +08:00
luukvbaal
563f9ef799 vim-patch:9.2.0081: Failed "z=" does not reset 'nospell' setting (#38109)
Problem:  When z= fails due to no word being found, 'spelllang' being
          unset or a multiline visual selection, 'nospell' is not
          restored.
Solution: Jump to where the user configured value of 'spell' is restored
          instead of returning early (Luuk van Baal).

closes: vim/vim#19525

eba078fc47
2026-03-01 09:21:48 +01:00
zeertzjq
7e8bdd348c vim-patch:9.2.0077: [security]: Crash when recovering a corrupted swap file (#38104)
Problem:  memline: a crafted swap files with bogus pe_page_count/pe_bnum
          values could cause a multi-GB allocation via mf_get(), and
          invalid pe_old_lnum/pe_line_count values could cause a SEGV
          when passed to readfile() (ehdgks0627, un3xploitable)
Solution: Add bounds checks on pe_page_count and pe_bnum against
          mf_blocknr_max before descending into the block tree, and
          validate pe_old_lnum >= 1 and pe_line_count > 0 before calling
          readfile().

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-r2gw-2x48-jj5p

65c1a143c3

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-28 04:33:47 +00:00
zeertzjq
e85fc92a6b vim-patch:9.2.0075: [security]: Buffer underflow with emacs tag file
Problem:  When parsing a malformed Emacs-style tags file, a 1-byte
          heap-buffer-underflow read occurs if the 0x7f delimiter
          appears at the very beginning of a line. This happens
          because the code attempts to scan backward for a tag
          name from the delimiter without checking if space exists.
          (ehdgks0627, un3xploitable)
Solution: Add a check to ensure the delimiter (p_7f) is not at the
          start of the buffer (lbuf) before attempting to isolate
          the tag name.

GitHub Advisory:
https://github.com/vim/vim/security/advisories/GHSA-xcc8-r6c5-hvwv

9b7dfa2948

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-28 08:12:25 +08:00
zeertzjq
95ddabdb2b vim-patch:9.2.0074: [security]: Crash with overlong emacs tag file
Problem:  Crash with overlong emacs tag file, because of an OOB buffer
          read (ehdgks0627, un3xploitable)
Solution: Check for end of buffer and return early.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-h4mf-vg97-hj8j

f6a7f469a9

Cherry-pick a change from patch 9.0.0767.
Add missing change from patch 9.2.0070.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-28 08:11:01 +08:00
zeertzjq
cd4c7850d0 vim-patch:9.2.0070: tests: various tests leave swapfiles around
Problem:  tests: various tests leave swapfiles around
Solution: close open buffers using :bw! instead of :close!

2fa34b6422

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-28 07:06:44 +08:00
zeertzjq
6ce964aed6 vim-patch:9.1.0539: Not enough tests for what v9.1.0535 fixed
Problem:  Not enough tests for what v9.1.0535 fixed
Solution: Add another test for ex-mode

This comes from: https://groups.google.com/g/vim_dev/c/F5-tDqoafz8/m/GqKF-uQsLD0J

related: vim/vim#15120

248efab9b5

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-28 07:04:49 +08:00
zeertzjq
453dfbf7d6 vim-patch:9.1.0535: newline escape wrong in ex mode
Problem:  newline escape wrong in ex mode (Konrad Schwarz)
Solution: partly revert patch 7.3.014, remove backslash in front of a
          newline when not in prompt mode in ex line mode
          (Mohamed Akram)

This fixes newline escaping to allow passing multiple commands to
":global", multiple lines to shell commands, and ending lines in append
mode with backslashes. This should fix a POSIX/(traditional) VI
incompatiblity.

This reverts a previous incorrect attempt at patch v7.3.014 to fix
append mode which removed half of trailing backslashes which lead to,
eg. the following two commands being parsed as having a different number
of backslashes:

```
!echo foo\\\
```

```
!echo foo\\ \
```

fixes: vim/vim#6135
fixes: vim/vim#7244
closes: vim/vim#15120

f3daa4525b

Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>
2026-02-28 07:04:08 +08:00
zeertzjq
7852993f49 vim-patch:9.2.0061: Not possible to know when a session will be loaded (#38071)
Problem:  Not possible to know when a session will be loaded.
Solution: Add the SessionLoadPre autocommand (Colin Kennedy).

fixes:  vim/vim#19084
closes: vim/vim#19306

1c0d468d72

Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
2026-02-26 21:30:44 +08:00
zeertzjq
327dcb8970 vim-patch:9.2.0046: filetype: neon files are not recoginzed (#38049)
Problem:  filetype: neon files are not recoginzed
Solution: Detect *.neon files as neon filetype
          (przepompownia)

Reference:
https://doc.nette.org/en/neon/format
https://github.com/fpob/nette.vim

closes: vim/vim#19496

ddd90672f2

Co-authored-by: przepompownia <przepompownia@users.noreply.github.com>
2026-02-25 07:53:43 +08:00
Sean Dewar
32d3dd0650 fix(statusline): broken statusline on error #38000
Problem: after #33036, an error from evaluating 'statusline' clears it and
doesn't draw the statusline. (causing glitchy redraws)

Solution: use the default value instead. If 'stl' is somehow ever empty, still
call redraw_custom_statusline to at least draw an empty statusline.

Ideally our default 'stl' shouldn't itself error too! :-)
Also adjust some prior screen:expect()s to avoid immediate success warnings.
2026-02-23 11:22:13 -05:00
zeertzjq
3f4ef487da vim-patch:9.2.0040: completion: preinsert wrong with register completion (#38003)
Problem:  completion: preinsert wrong with register completion
Solution: Remove preinserted text during register content insertion
          (Girish Palya).

fixes:  vim/vim#19329
closes: vim/vim#19474

3684ad83d1

Co-authored-by: Girish Palya <girishji@gmail.com>
2026-02-22 08:13:15 +08:00
zeertzjq
30d9970cd7 vim-patch:9.2.0036: completion: thesaurus completion incorrect with "longest/fuzzy" (#37996)
Problem:  completion: thesaurus completion incorrect with
          "longest/fuzzy" (Mao-Yining)
Solution: Disable fuzzy matching and longest-match insertion
          specifically for thesaurus completion (Girish Palya).

fixes:  vim/vim#19356
closes: vim/vim#19475

26a3f486cc

Co-authored-by: Girish Palya <girishji@gmail.com>
2026-02-21 19:54:25 +08:00
zeertzjq
93a8acb1b8 vim-patch:9.2.0033: filetype: sh filetype used for env files
Problem:  filetype: sh filetype used for env files
Solution: Detect *.env and .env.* files as env filetype,
          detect .envrc and .envrc.* as sh filetype,
          include a simple env syntax script (DuckAfire)

Previously, .env files were handled by the shell syntax. While
functional, this limited the ability to support specific .env
implementations, such as CodeIgniter4 which allows dots in keys
(e.g., "foo.bar=0").

The new dedicated 'env' filetype and syntax script improves legibility
and prevents highlighting from breaking when encountering spaces.
Currently, the syntax does not support indentation; fields, variables,
and comments must start at the beginning of the line.

closes: vim/vim#19260

d0fa375629

Co-authored-by: DuckAfire <155199080+duckafire@users.noreply.github.com>
2026-02-20 09:26:07 +08:00
zeertzjq
c78e276881 vim-patch:9.2.0027: filetype: yara files are not recognized
Problem:  filetype: yara files are not recognized
Solution: Detect *.yara and *.yar files as yara filetype
          (Thomas Dupuy).

Reference:
- https://github.com/VirusTotal/yara
- https://github.com/VirusTotal/yara-x

closes: vim/vim#19460

7d93ae57f0

Co-authored-by: Thomas Dupuy <thom4s.d@gmail.com>
2026-02-20 09:17:46 +08:00
zeertzjq
6e8a1a8988 vim-patch:9.2.0032: completion: hang with line completion and fuzzy
Problem:  completion: hang with line completion and fuzzy (Jesse Pavel)
Solution: Only check the line number when wrapping around the file
          (Hirohito Higashi).

fixes:  vim/vim#19434
closes: vim/vim#19443

d8648f7279

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-02-20 09:01:20 +08:00
zeertzjq
08b8fe5ab3 vim-patch:9.2.0030: completion: non-prefix matches shown when leader is NULL
Problem:  When 'autocomplete' fires before compl_leader is initialized,
          the prefix filter is bypassed. This allows non-prefix matches
          (e.g. from fuzzy omnifuncs) to be shown in the popup menu and
          incorrectly preinserted.
Solution: In get_leader_for_startcol(), if compl_leader.string is NULL,
          fall back to using compl_orig_text as a filter for matches
	  starting at or after the completion column (Hirohito Higashi).

When 'autocomplete' first fires, compl_leader is NULL because
ins_compl_start() has not set it yet.  This caused the prefix filter in
ins_compl_build_pum(), find_next_completion_match() and
find_common_prefix() to be bypassed, allowing non-prefix fuzzy omnifunc
matches to appear in the PUM and be preinserted.

Extend get_leader_for_startcol() to fall back to compl_orig_text when
compl_leader.string is NULL: if the match's cpt source startcol is less
than compl_col the match includes pre-compl_col text, so return
&compl_leader (NULL string) to signal "pass through"; otherwise return
&compl_orig_text so callers filter by the original text.  The compl_col
<= 0 guard is kept only for the prepend-text path to avoid it
interfering with the NULL-leader fallback when compl_col is zero.

With this change all callers of get_leader_for_startcol() automatically
receive the correct filter string without additional helpers.

Also update Test_autocomplete_trigger Test 9 to reflect the new
behavior: 'faberge' is no longer shown when completing 'foo' because
it does not start with the current prefix.

Add Test_autocomplete_preinsert_null_leader() to verify that only
prefix-matching candidates appear in the PUM and are preinserted.

fixes:  vim/vim#19328
closes: vim/vim#19447

a04ae0210b

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 08:58:41 +08:00
zeertzjq
785ac9f228 vim-patch:9.2.0028: matchadd() conceal may use unrelated syntax cchar (#37974)
Problem:  matchadd() conceal may use unrelated syntax cchar.
Solution: Only use syntax cchar when syntax_flags has HL_CONCEAL
          (zeertzjq).

closes: vim/vim#19459

d01f234ec1
2026-02-19 22:51:31 +00:00