]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
3 weeks agopatch 9.2.0242: memory leak in check_for_cryptkey() v9.2.0242
Huihui Huang [Wed, 25 Mar 2026 19:11:13 +0000 (19:11 +0000)] 
patch 9.2.0242: memory leak in check_for_cryptkey()

Problem:  memory leak in check_for_cryptkey()
Solution: Free cryptkey if it had been allocated
          (Huihui Huang)

closes: #19821

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.2.0241: tests: Test_visual_block_hl_with_autosel() is flaky v9.2.0241
Christian Brabandt [Wed, 25 Mar 2026 19:03:50 +0000 (19:03 +0000)] 
patch 9.2.0241: tests: Test_visual_block_hl_with_autosel() is flaky

Problem:  tests: Test_visual_block_hl_with_autosel() is flaky on ASAN CI
          (after v9.2.0221)
Solution: Add a TermWait() call

related: #19784

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.2.0240: syn_name2id() is slow due to linear search v9.2.0240
Yasuhiro Matsumoto [Tue, 24 Mar 2026 20:47:27 +0000 (20:47 +0000)] 
patch 9.2.0240: syn_name2id() is slow due to linear search

Problem:  Looking up highlight group names uses a linear scan of the
          highlight table, which is slow at startup when many groups
          are defined.
Solution: Use a hashtable for O(1) highlight group name lookup.
          (Yasuhiro Matsumoto).

Benchmark (523 highlight groups, :highlight + highlight link + syntax
keyword + hlID() + redraw, 20 iterations):

master:      0.057 sec (~295,000 ops/sec)
this branch: 0.036 sec (~463,000 ops/sec)
speedup:     ~1.57x

closes: #19788

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agoruntime(sh): Distinguish parts of function definitions
Aliaksei Budavei [Tue, 24 Mar 2026 20:36:23 +0000 (20:36 +0000)] 
runtime(sh): Distinguish parts of function definitions

- Highlight keywords "function" and "namespace" with
  the "Keyword" group ("shFunctionKey").
- Highlight function body delimiters "{" and "}" with the
  "Delimiter" group ("shFunctionExprRegion").
- Highlight function body delimiters "(" and ")" with the
  "Operator" group ("shFunctionSubShRegion").
- Also, follow one style in folding all supported variants
  of function bodies for grouping commands too by enclosing
  a delimited function body, e.g. "{" and "}", in a fold and
  leaving its function header, e.g. "function f()", out of
  it when the header is written on a separate line.

To restore previous colouring, add to "after/syntax/sh.vim":
------------------------------------------------------------
hi link shFunctionKey Function
hi link shFunctionExprRegion Function
hi link shFunctionSubShRegion Function
------------------------------------------------------------

fixes:  https://github.com/vim/vim/pull/19638#issuecomment-4052635546
closes: #19638

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agoruntime(sh): Improve the matching of function definitions
Aliaksei Budavei [Tue, 24 Mar 2026 20:34:15 +0000 (20:34 +0000)] 
runtime(sh): Improve the matching of function definitions

- Drop the remaining undefined "shFunctionStart" references
  (gone in v7.2b.000, c236c16d0).
- Revise nestable contexts where function definitions are
  supported:
  * Stop looking for function definitions in arithmetic
    expressions.
  * Recognise function definitions enclosing other function
    definitions.
- In addition to grouping commands "{}" and "()", also match
  other compound commands (e.g. "if"; see "shFunctionCmd*")
  whenever these commands are supported as complete function
  bodies.
- Balance body delimiters "(" and ")" for "shFunctionFour"
  in Bash; match such function bodies whenever the use of
  the function parameter list "()" token is optional, i.e.
  when the "function" reserved word is present.
- Enable the use of "shFunctionFour" definitions.
- Do not claim optional leading whitespace characters before
  a matched function definition.
- Prefer patterns with ASCII atoms (e.g. "\h") to equivalent
  collections (e.g. "[A-Za-z_]") for speed.
- Accommodate word-boundary assertions in function name
  patterns to names that may start and/or end with supported
  non-word characters, e.g. "@test:".
- Match more valid function names in Bash: non-ASCII names,
  non-word names.
- Allow for function names with "do", "done", etc. prefixes;
  confine these name checks to "shDoError" and "shIfError".

fixes:   #19619
related: #19638

References:
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_09_04
https://gitweb.git.savannah.gnu.org/gitweb/?p=bash.git;a=blob_plain;f=doc/bash.html;hb=637f5c8696a6adc9b4519f1cd74aa78492266b7f
https://web.archive.org/web/20151105130220/http://www.research.att.com/sw/download/man/man1/ksh88.html
https://web.archive.org/web/20151025145158/http://www2.research.att.com/sw/download/man/man1/ksh.html
http://www.mirbsd.org/htman/i386/man1/mksh.htm

Co-authored-by: Johnothan King <johnothanking@protonmail.com>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.2.0239: signcolumn may cause flicker v9.2.0239
Yasuhiro Matsumoto [Tue, 24 Mar 2026 20:25:06 +0000 (20:25 +0000)] 
patch 9.2.0239: signcolumn may cause flicker

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:  #19663
closes: #19713

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.2.0238: showmode message may not be displayed v9.2.0238
Hirohito Higashi [Tue, 24 Mar 2026 20:06:05 +0000 (20:06 +0000)] 
patch 9.2.0238: showmode message may not be displayed

Problem:  showmode message may not be displayed (Yee Cheng Chin)
Solution: Don't call char_avail() in skip_showmode(), but check
          for anything in the stuff and typeahead buffer
          (Hirohito Higashi).

Fix "-- VISUAL --" not shown when terminal responses are pending

When starting Vim with a script that enters Visual mode (e.g.
"vim -S script.vim"), the "-- VISUAL --" mode message sometimes
doesn't appear. This happens because skip_showmode() calls
char_avail(), which reads raw terminal input and picks up terminal
response escape sequences (e.g. t_RV response). Combined with
!KeyTyped (which is TRUE after script execution), this causes
skip_showmode() to return TRUE, preventing the mode from being
displayed.

Fix this by checking only the stuff buffer and typeahead buffer for
pending characters, instead of char_avail() which also reads raw
terminal input. This way, terminal response sequences no longer
interfere with mode display.

fixes:  #16620
closes: #19801

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.2.0237: filetype: ObjectScript routines are not recognized v9.2.0237
Hannah Kimura [Tue, 24 Mar 2026 19:58:01 +0000 (19:58 +0000)] 
patch 9.2.0237: filetype: ObjectScript routines are not recognized

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: #19805

Signed-off-by: Hannah Kimura <hannah.kimura@intersystems.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agoruntime(manpager): use \x07 instead of \a for BEL in OSC 8 regex
Yasuhiro Matsumoto [Tue, 24 Mar 2026 19:45:04 +0000 (19:45 +0000)] 
runtime(manpager): use \x07 instead of \a for BEL in OSC 8 regex

\a in Vim's regex matches [A-Za-z], not the BEL character (0x07).
This caused the OSC 8 hyperlink stripping pattern to incorrectly
match alphabetic characters, breaking man page display.

Use \x07 (inside []) and %x07 (outside []) to correctly match BEL.

closes: #19806

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0236: stack-overflow with deeply nested data in json_encode/decode() v9.2.0236
Yasuhiro Matsumoto [Mon, 23 Mar 2026 21:42:04 +0000 (21:42 +0000)] 
patch 9.2.0236: stack-overflow with deeply nested data in json_encode/decode()

Problem:  stack-overflow with deeply nested data in json_encode/decode()
          (ZyX-I)
Solution: Add depth limit check using 'maxfuncdepth' to
          json_encode_item() and json_decode_item() to avoid crash when
          encoding/decoding deeply nested lists, dicts, or JSON arrays/objects,
          fix typo in error name, add tests (Yasuhiro Matsumoto).

fixes:  #588
closes: #19808

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(java): Make changes for JDK 26
Aliaksei Budavei [Mon, 23 Mar 2026 19:54:00 +0000 (19:54 +0000)] 
runtime(java): Make changes for JDK 26

Reintroduce supported syntax-preview-feature numbers 455,
488, and 507 as _a new number_ 530.

Reference:
https://openjdk.org/jeps/530 (Primitive Types in Patterns etc.)

closes: #19793

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0235: filetype: wks files are not recognized. v9.2.0235
Anakin Childerhose [Mon, 23 Mar 2026 19:40:12 +0000 (19:40 +0000)] 
patch 9.2.0235: filetype: wks files are not recognized.

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: #19796

Signed-off-by: Anakin Childerhose <anakin@childerhose.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0234: test: Test_close_handle() is flaky v9.2.0234
Yasuhiro Matsumoto [Mon, 23 Mar 2026 19:29:57 +0000 (19:29 +0000)] 
patch 9.2.0234: test: Test_close_handle() is flaky

Problem:  test: Test_close_handle() is flaky
Solution: Use WaitForAssert() to wait for the channel to be closed
          (Yasuhiro Matsumoto)

Ch_close_handle() did not wait for the channel to be fully closed,
which could cause Ch_CloseHandler to fire during the next test's
GetPort() sleep loop, resulting in E906.

Wait for ch_status() to become 'closed' before returning.

closes: #19797

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0233: Compiler warning in strings.c v9.2.0233
Hirohito Higashi [Mon, 23 Mar 2026 18:46:31 +0000 (18:46 +0000)] 
patch 9.2.0233: Compiler warning in strings.c

Problem:  Compiler warning in strings.c
          (Timothy Rice, after v9.2.0031)
Solution: Return early when str_m is zero
          (Hirohito Higashi)

fixes:  #19795
closes: #19800

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0232: fileinfo not shown after :bd of last listed buffer v9.2.0232
Hirohito Higashi [Sun, 22 Mar 2026 21:41:42 +0000 (21:41 +0000)] 
patch 9.2.0232: fileinfo not shown after :bd of last listed buffer

Problem:  fileinfo not shown after :bd of last listed buffer
          (memeplex)
Solution: Set need_fileinfo to true in empty_curbuf()
          (Hirohito Higashi)

When deleting the last listed buffer with :bd, the new empty buffer's
file info (e.g. "[No Name]" --No lines in buffer--) was not displayed.
do_ecmd() only calls fileinfo() for existing buffers (oldbuf), not for
newly created empty buffers.

Set need_fileinfo in empty_curbuf() so the file info is displayed after
redraw.

fixes:  #548
closes: #19802

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0231: Amiga: Link error for missing HAVE_LOCALE_H v9.2.0231
Ola Söder [Sun, 22 Mar 2026 21:03:45 +0000 (21:03 +0000)] 
patch 9.2.0231: Amiga: Link error for missing HAVE_LOCALE_H

Problem:  AROS/MorphOS/AmigaOS tiny/small link error
Solution: Include get_cmd_output by defining HAVE_LOCALE_H
          (Ola Söder)

closes: #19792

Signed-off-by: Ola Söder <rolfkopman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0230: popup: opacity not working accross vert splits v9.2.0230
Yasuhiro Matsumoto [Sun, 22 Mar 2026 20:38:22 +0000 (20:38 +0000)] 
patch 9.2.0230: popup: opacity not working accross vert splits

Problem:  popup: opacity not working across vert splits
Solution: Iterate over the full popup width to find all underlying
          windows (Yasuhiro Matsumoto)

redraw_win_under_opacity_popup() only checked the popup's left column
to find underlying windows. When a popup spans a vertical split, the
right-side window was never forced to redraw, causing blended
ScreenAttrs values to accumulate across redraw cycles.

Iterate across the full popup width to find and redraw all underlying
windows.

closes: #19737

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0229: keypad keys may overwrite keycode for another key v9.2.0229
AstroSnail [Sun, 22 Mar 2026 20:21:50 +0000 (20:21 +0000)] 
patch 9.2.0229: keypad keys may overwrite keycode for another key

Problem:  In XTerm, with 'xtermcodes' enabled (default), vim will
          request keypad keys after editing pad keys, and will remove
          the latter when they're duplicates of the former.
Solution: When a termcode reply is a keypad key and it would replace a
          different key, skip it.

fixes:   #19182 (case 2)
related: #19643
closes:  #19644

Signed-off-by: AstroSnail <astrosnail@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agotranslation(it): Update Italian translation
Antonio Giovanni Colombo [Sun, 22 Mar 2026 18:16:43 +0000 (18:16 +0000)] 
translation(it): Update Italian translation

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agotranslation(it): Update Italian xxd man page
Antonio Giovanni Colombo [Sun, 22 Mar 2026 18:13:45 +0000 (18:13 +0000)] 
translation(it): Update Italian xxd man page

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0228: still possible flicker v9.2.0228
Yasuhiro Matsumoto [Sun, 22 Mar 2026 17:21:09 +0000 (17:21 +0000)] 
patch 9.2.0228: still possible flicker

Problem:  still possible flicker
Solution: Use redraw_as_cleared() instead of screenclear() to avoid
          flicker (Yasuhiro Matsumoto).

When the window width matches the frame width, screenclear() causes
visible flicker. Use redraw_as_cleared() instead which marks the
screen for redraw without actually clearing it.

closes: #19732

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0227: MS-Windows: CSI sequences may be written to screen v9.2.0227
Yasuhiro Matsumoto [Sun, 22 Mar 2026 17:05:14 +0000 (17:05 +0000)] 
patch 9.2.0227: MS-Windows: CSI sequences may be written to screen

Problem:  MS-Windows: CSI sequences may be written to screen
          (after v9.2.0200).
Solution: Move the CSI parsing and skipping logic outside of the USE_VTP
          guard in mch_write() so that sequences are always consumed
          even if VTP is inactive (Yasuhiro Matsumoto).

After v9.2.0200 added send_decrqm_modes(), running vim -u NONE -U NONE
-N on Windows displays raw ESC[?2026$p on screen. This is because
USE_VTP is false when termguicolors is off and t_colors < 256, and the
CSI skip logic in mch_write() was inside the if (USE_VTP) block, so
s/len were never advanced and the escape sequence leaked out as plain
text.

Move the CSI parsing/skipping outside the USE_VTP guard so sequences are
always consumed. Only the vtp_printf() pass-through for DECSCUSR (q)
remains conditional on USE_VTP.

related: #19755
closes:  #19762

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0226: No 'incsearch' highlighting support for :uniq v9.2.0226
Hirohito Higashi [Sun, 22 Mar 2026 17:00:46 +0000 (17:00 +0000)] 
patch 9.2.0226: No 'incsearch' highlighting support for :uniq

Problem:  No 'incsearch' highlighting support for :uniq
Solution: Add :uniq support (Hirohito Higashi)

closes: #19780

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0225: runtime(compiler): No compiler plugin for just v9.2.0225
Aditya Malik [Sun, 22 Mar 2026 16:46:41 +0000 (16:46 +0000)] 
patch 9.2.0225: runtime(compiler): No compiler plugin for just

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: #19773

Signed-off-by: Aditya Malik <adityamalik2833@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0224: channel: 2 issues with out/err callbacks v9.2.0224
Hirohito Higashi [Sun, 22 Mar 2026 16:32:07 +0000 (16:32 +0000)] 
patch 9.2.0224: channel: 2 issues with out/err callbacks

Problem:  channel: 2 issues with out/err callbacks
Solution: fix indentation and output order with term_start()
          (Hirohito Higashi).

When term_start() is called with err_cb (and optionally out_cb),
two issues occur:
1. Unexpected indentation in the terminal buffer display: stderr
   arrives via a pipe which lacks the PTY ONLCR line discipline,
   so bare LF moves the cursor down without a CR, causing each
   subsequent line to be indented one column further.

2. stdout appears in the terminal and callbacks before stderr,
   even when the child process writes to stderr first.  This is
   because channel_parse_messages() iterates parts in enum order
   (PART_OUT before PART_ERR), so when both have buffered data
   they are always processed in the wrong order.

Solution:
- In may_invoke_callback(), before writing PART_ERR data to the
  terminal buffer, convert bare LF to CR+LF so that vterm renders
  each line at column 0.

- In channel_parse_messages(), when about to process PART_OUT of a
  terminal PTY job, if PART_ERR already has readahead data, skip
  PART_OUT and process PART_ERR first.  This works without any
  artificial delay because channel_select_check() reads all ready
  file descriptors into their readahead buffers in a single
  select() pass before any callbacks are invoked; by the time
  channel_parse_messages() runs, both buffers are populated and
  the skip logic can enforce the correct order.

- Also add a per-line split for out_cb/err_cb on terminal PTY
  jobs: instead of passing a potentially multi-line raw chunk to
  the callback, split on NL and strip trailing CR so each callback
  receives exactly one clean line.

Add Test_term_start_cb_per_line() to verify that err_cb and out_cb
each receive one line per call, with correct stderr-before-stdout
ordering, without any sleep between the writes.

fixes:  #16354
closes: #19776

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agotranslation: Regenerate desktop files in runtime directory
Mao-Yining [Sun, 22 Mar 2026 16:27:43 +0000 (16:27 +0000)] 
translation: Regenerate desktop files in runtime directory

I don't know whether it is necessary to copy desktop files to runtime/
manually, but these two files seem not to have been updated for some
time.

The change in Makefile is because the previous pattern will throw an error:

C:\msys64\ucrt64\bin\sed.exe: -e expression #1, char 3: unknown command: `.'

which I am not sure why.

closes: #19777

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0223: Option handling for key:value suboptions is limited v9.2.0223
Hirohito Higashi [Sun, 22 Mar 2026 16:08:01 +0000 (16:08 +0000)] 
patch 9.2.0223: Option handling for key:value suboptions is limited

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:  #18495
closes: #19783

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0222: "zb" scrolls incorrectly with cursor on fold v9.2.0222
zeertzjq [Sun, 22 Mar 2026 15:49:59 +0000 (15:49 +0000)] 
patch 9.2.0222: "zb" scrolls incorrectly with cursor on fold

Problem:  "zb" scrolls incorrectly with cursor on fold.
Solution: Set w_botline to the line below the fold (zeertzjq).

related: neovim/neovim#38413
closes:  #19785

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0221: Visual selection drawn incorrectly with "autoselect" v9.2.0221
zeertzjq [Sun, 22 Mar 2026 15:44:47 +0000 (15:44 +0000)] 
patch 9.2.0221: Visual selection drawn incorrectly with "autoselect"

Problem:  Visual selection may be drawn incorrectly with "autoselect".
Solution: Restore w_virtcol after getting clipboard selection
          (zeertzjq).

fixes:  #19590
closes: #19784

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0220: MS-Windows: some defined cannot be set on Cygwin/Mingw v9.2.0220
Muraoka Taro [Sun, 22 Mar 2026 15:32:57 +0000 (15:32 +0000)] 
patch 9.2.0220: MS-Windows: some defined cannot be set on Cygwin/Mingw

Problem:  In Cygwin and MinGW, options like MODIFIED_BY cannot be set.
          MSVC (Make_mvc.mak) allows you to build optional features
          without modifying the source code by specifying DEFINES in the
          nmake options. However, this is not the case in
          Make_cyg_ming.mak.
Solution: Since DEFINES is used in many places, we will provide
          EXTRA_DEFINES assuming that the user will define it. By adding
          this to DEFINES, it will be possible to specify it in the same
          way as in MSVC.

closes: #19786

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(manpager): Strip OSC 8 hyperlink sequences in manpager plugin
Yasuhiro Matsumoto [Sun, 22 Mar 2026 15:28:28 +0000 (15:28 +0000)] 
runtime(manpager): Strip OSC 8 hyperlink sequences in manpager plugin

fixes:  #19726
closes: #19787

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0219: call stack can be corrupted v9.2.0219
Sergey Vlasov [Fri, 20 Mar 2026 23:21:28 +0000 (23:21 +0000)] 
patch 9.2.0219: call stack can be corrupted

Problem:  call stack can be corrupted, because calculated remaining
          capacity for call stack string can underflow (after v9.1.1983)
Solution: Calculate capacity against maximum capacity
          (Sergey Vlasov).

closes: #19759

Signed-off-by: Sergey Vlasov <sergey@vlasov.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0218: visual selection highlighting in X11 GUI is wrong. v9.2.0218
Shane Harper [Fri, 20 Mar 2026 23:12:33 +0000 (23:12 +0000)] 
patch 9.2.0218: visual selection highlighting in X11 GUI is wrong.

Problem:  The check for whether an X connection was opened was incorrect
          (after v9.2.0158).
Solution: Use X_DISPLAY instead of xterm_dpy (Shane Harper)

Note: xterm_dpy would be NULL if Vim was started in GUI mode.

Previously, starting two instances of gvim that use GTK3 with:
GDK_BACKEND=x11 gvim and making a visual selection in both would leave
both selections highlighted with the Visual highlight group. Now, when
the second selection is made the first selection will be highlighted
with VisualNOS.

closes: #19752

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0217: filetype: cto files are not recognized v9.2.0217
Jamie Shorten [Fri, 20 Mar 2026 23:03:10 +0000 (23:03 +0000)] 
patch 9.2.0217: filetype: cto files are not recognized

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: #19760

Signed-off-by: Jamie Shorten <jamie@jamieshorten.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0216: MS-Windows: Rendering artifacts with DirectX v9.2.0216
Yasuhiro Matsumoto [Fri, 20 Mar 2026 22:51:30 +0000 (22:51 +0000)] 
patch 9.2.0216: MS-Windows: Rendering artifacts with DirectX

Problem:  MS-Windows: Rendering artifacts with DirectX
          (Alexander Zhura)
Solution: Force redraw (Yasuhiro Matsumoto)

DirectWrite subpixel rendering (especially with CFF/OTF fonts) can
extend glyph pixels beyond cell boundaries.  Vim already handles the
forward direction (redraw the next character when the current one
changes) for MS-Windows antialiasing, but the backward direction was
missing.

Add gui.directx_enabled flag accessible from screen.c and extend the
existing spill-over handling to:
- Redraw the current character when the previous one changed (backward)
- Force redraw of the next character in screen_puts_len() and
  screen_fill() paths

fixes:  #19586
closes: #19761

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0215: MS-Windows: several tests fail in the Windows CUI. v9.2.0215
Muraoka Taro [Fri, 20 Mar 2026 22:42:02 +0000 (22:42 +0000)] 
patch 9.2.0215: MS-Windows: several tests fail in the Windows CUI.

Problem:  The Windows CUI actively buffers transmissions to terms. Patch
          0200 changed the timing of DECRQM transmissions, and
          out_flush() is no longer called after transmission. Therefore,
          actual term initialization does not occur until the buffer is
          flushed, causing the following tests to fail:
            - test_autocmd.vim - Test_Changed_FirstTime()
            - test_mapping.vim - Test_error_in_map_expr()
            - test_messages.vim - Test_mode_message_at_leaving_insert_with_esc_mapped()
            - test_search.vim - Test_search_cmdline_incsearch_highlight_attr()

            The failures since version 200 can be confirmed in the following CI jobs.
            - 9.2.0200 https://github.com/vim/vim/actions/runs/23312934497
                - https://github.com/vim/vim/actions/runs/23312934497/job/67804736843
                - https://github.com/vim/vim/actions/runs/23312934497/job/67804736752
                - https://github.com/vim/vim/actions/runs/23312934497/job/67804736735
            - 9.2.0199 https://github.com/vim/vim/actions/runs/23311871938
                - The above test can be confirmed to be successful.
Solution: After sending DECRQM in send_decrqm_modes(), explicitly call
          out_flush() to ensure terminal initialization (Muraoka Taro).

closes: #19764

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0214: tests: Test_gui_system_term_scroll() is flaky v9.2.0214
Yasuhiro Matsumoto [Fri, 20 Mar 2026 22:34:11 +0000 (22:34 +0000)] 
patch 9.2.0214: tests: Test_gui_system_term_scroll() is flaky

Problem:  tests: Test_gui_system_term_scroll() is flaky
          (after: v9.2.0208)
Solution: Fix test (Yasuhiro Matsumoto)

Remove timer-based screen check and use a simple command instead
of ping.  The timer could fire before ConPTY initialization was
complete, causing screenstring() to return an empty string.

Check screenstring() directly after the command finishes instead.

related: #19735
closes:  #19765

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0213: Crash when using a partial or lambda as a clipboard provider v9.2.0213
Shane Harper [Fri, 20 Mar 2026 22:26:59 +0000 (22:26 +0000)] 
patch 9.2.0213: Crash when using a partial or lambda as a clipboard provider

Problem:  Crash when using a partial or lambda as a clipboard provider
Solution: Don't call free_callback() from clip_provider_get_callback()
          (Shane Harper).

closes: #19766

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0212: MS-Windows: version packing may overflow v9.2.0212
Mao-Yining [Fri, 20 Mar 2026 22:06:58 +0000 (22:06 +0000)] 
patch 9.2.0212: MS-Windows: version packing may overflow

Problem:  MS-Windows: version packing may overflow (after v9.2.0206)
Solution: Explicitly clamp the version components using min()
          (Mao-Yining).

The version components (major, minor, build) from RtlGetVersion are now
clamped to their maximum bit widths (8 bits, 8 bits, 15 bits) before
being packed into a 32-bit integer. This prevents overflow when storing
unexpectedly large values.

This fixes a regression introduced in patch 9.2.0206 where the previous
clamping logic was accidentally removed.

The MAKE_VER macro is simplified by removing bit masks, as clamping is
now done at the call site, making the macro clearer and reducing
redundant masking.

closes: #19769

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agotranslation(zh): Update the Simplify Chinese translation
Mao-Yining [Fri, 20 Mar 2026 22:00:08 +0000 (22:00 +0000)] 
translation(zh): Update the Simplify Chinese translation

closes: #19771

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agotranslation: align sponsor menu string spacing
Mao-Yining [Fri, 20 Mar 2026 21:59:11 +0000 (21:59 +0000)] 
translation: align sponsor menu string spacing

Normalize white space in the "menu Help->Sponsor" message across all
translation files and the version.c intro handler. This ensures
consistent column alignment when displayed in the user interface.

related: #19771

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0211: possible crash when setting 'winhighlight' v9.2.0211
Foxe Chen [Fri, 20 Mar 2026 21:45:13 +0000 (21:45 +0000)] 
patch 9.2.0211: possible crash when setting 'winhighlight'

Problem:  possible crash when setting 'winhighlight'
Solution: Validate the option value more carefully (Foxe Chen)

closes: #19774

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(fish): Add matchit support to filetype plugin
Phạm Bình An [Fri, 20 Mar 2026 21:29:57 +0000 (21:29 +0000)] 
runtime(fish): Add matchit support to filetype plugin

closes: #19701

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0210: tests: Test_xxd tests are failing v9.2.0210
Muraoka Taro [Fri, 20 Mar 2026 21:19:03 +0000 (21:19 +0000)] 
patch 9.2.0210: tests: Test_xxd tests are failing

Problem:  tests: Test_xxd tests are failing, after changing the xxd
          manpage (after v9.2.0205)
Solution: Update the manpage, shorten the date and update the example,
          regenerate the expected test output, skip the first 30 bytes
          for the one of the xxd tests (Muraoka Taro)

Some of the Test_xxd tests depend on the contents of xxd.1. The patch
9.2.0205 changed xxd.1, but the test fixes were insufficient. The test
that dumps the beginning of xxd.1 and the test that reads 13 bytes
starting from byte 0x33 from the beginning were failing.

closes: #19763

Co-authored-by: James McCoy <jamessan@debian.org>
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(doc): Update Italian xxd manpage
Antonio Giovanni Colombo [Thu, 19 Mar 2026 22:12:44 +0000 (22:12 +0000)] 
runtime(doc): Update Italian xxd manpage

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0209: freeze during wildmenu completion v9.2.0209
Yasuhiro Matsumoto [Thu, 19 Mar 2026 21:59:45 +0000 (21:59 +0000)] 
patch 9.2.0209: freeze during wildmenu completion

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:  #19742
closes: #19744

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0208: MS-Windows: excessive scroll-behaviour with go+=! v9.2.0208
Yasuhiro Matsumoto [Thu, 19 Mar 2026 21:48:57 +0000 (21:48 +0000)] 
patch 9.2.0208: MS-Windows: excessive scroll-behaviour with go+=!

Problem:  MS-Windows: excessive scroll-behaviour with go+=! after
          switching to ConPTY as default (after v9.2.0048).
Solution: Use tl_cursor_pos to determine the number of lines to scroll
          (Yasuhiro Matsumoto).

Since patch 9.2.0048 (71cc1b12) made ConPTY the default on Windows 11,
running :!cmd with guioptions+=! scrolls up the entire window height
instead of only the output lines.

ConPTY damages all terminal rows on initialization even when they are
empty, which causes tl_dirty_row_end to equal Rows.  The scroll-up loop
in update_system_term() then scrolls the full screen because
(Rows - tl_toprow) < tl_dirty_row_end is always true until tl_toprow
reaches 0.

Use the cursor position instead of tl_dirty_row_end for the scroll
calculation, since it reflects where actual content has been written.

The scroll bug only occurs with ConPTY.  With winpty the terminal
finishes too quickly for the timer-based screen check to work.

closes: #19735

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0207: MS-Windows: freeze on second :hardcopy v9.2.0207
Yasuhiro Matsumoto [Thu, 19 Mar 2026 21:40:25 +0000 (21:40 +0000)] 
patch 9.2.0207: MS-Windows: freeze on second :hardcopy

Problem:  MS-Windows: freeze on second :hardcopy
          (antoniopaolini)
Solution: Enable PrintHookProc in GUI mode to ensure the print dialog is
          brought to the foreground (Yasuhiro Matsumoto).

Enable PrintHookProc for GUI mode so that the print dialog is brought
to the foreground via BringWindowToTop/SetForegroundWindow.  Without
the hook, the second PrintDlgW() modal dialog appears behind gvim due
to Windows foreground lock timeout, making gvim unresponsive.

Also add NULL checks for hDlgPrint in SendMessage calls.

fixes:  #19715
closes: #19754

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0206: MS-Window: stripping all CSI sequences v9.2.0206
Yasuhiro Matsumoto [Thu, 19 Mar 2026 21:31:34 +0000 (21:31 +0000)] 
patch 9.2.0206: MS-Window: stripping all CSI sequences

Problem:  MS-Window: stripping all CSI sequences
          (Ke Mao, after v9.2.0184)
Solution: Restore vtp_printf() to pass-through DECSUSR codes
          (Yasuhiro Matsumoto).

Patch 9.2.0184 discards all CSI sequences in mch_write() when VTP is
active to prevent unwanted DECRQM responses.  However, this also
removed the existing DECSCUSR pass-through, breaking cursor shape
changes (t_SI/t_SR/t_EI) on Windows Terminal.

Restore vtp_printf() pass-through for DECSCUSR (final byte 'q') while
continuing to discard other CSI sequences.

related: #19694
related: #11532
fixes:   #19750
closes:  #19755

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(doc): disable color codes when generating ascii man pages in Makefile
Christian Brabandt [Thu, 19 Mar 2026 21:26:50 +0000 (21:26 +0000)] 
runtime(doc): disable color codes when generating ascii man pages in Makefile

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0205: xxd: Cannot NUL terminate the C include file style v9.2.0205
Lukáš Jiřiště [Thu, 19 Mar 2026 20:33:18 +0000 (20:33 +0000)] 
patch 9.2.0205: xxd: Cannot NUL terminate the C include file style

Problem:  xxd: Cannot NUL terminate the C include file style
Solution: Add option -t to end output with terminating null
          (Lukáš Jiřiště).

fixes:  #14409
closes: #19745

Signed-off-by: Lukáš Jiřiště <kyci@ljiriste.work>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0204: filetype: cps files are not recognized v9.2.0204
Guillaume Barbier [Thu, 19 Mar 2026 20:24:40 +0000 (20:24 +0000)] 
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: #19758

Signed-off-by: Guillaume Barbier <barbier.guillaume60@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0203: Patch v9.2.0185 was wrong v9.2.0203
Hirohito Higashi [Thu, 19 Mar 2026 20:19:07 +0000 (20:19 +0000)] 
patch 9.2.0203: Patch v9.2.0185 was wrong

Problem:  Patch v9.2.0185 was wrong
Solution: Revert patch v9.2.0185, root cause fixed in v9.2.0197
          (Hirohito Higashi).

related: #19730
related: #19734
closes:  #19749

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0202: [security]: command injection via newline in glob() v9.2.0202
pyllyukko [Thu, 19 Mar 2026 19:58:05 +0000 (19:58 +0000)] 
patch 9.2.0202: [security]: command injection via newline in glob()

Problem:  The glob() function on Unix-like systems does not escape
          newline characters when expanding wildcards. A maliciously
          crafted string containing '\n' can be used as a command
          separator to execute arbitrary shell commands via
          mch_expand_wildcards(). This depends on the user's 'shell'
          setting.
Solution: Add the newline character ('\n') to the SHELL_SPECIAL
          definition to ensure it is properly escaped before being
          passed to the shell (pyllyukko).

closes: #19746

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-w5jw-f54h-x46c

Signed-off-by: pyllyukko <pyllyukko@maimed.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0201: filetype: Wireguard config files not recognized v9.2.0201
Furkan Sahin [Thu, 19 Mar 2026 19:28:39 +0000 (19:28 +0000)] 
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: #19751

Signed-off-by: Furkan Sahin <furkan-dev@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0200: term: DECRQM codes are sent too early v9.2.0200
Foxe Chen [Thu, 19 Mar 2026 19:10:32 +0000 (19:10 +0000)] 
patch 9.2.0200: term: DECRQM codes are sent too early

Problem:  term: DECRQM codes are sent too early, the resulting DECRPM
          responses can arrive after Vim has already exited, leaking
          into the shell's input buffer (Christian Brabandt).
Solution: Only send DECRQM codes once termcap_active is set
          (Foxe Chen).

related: #19660
fixes:   #19660#issuecomment-4085448070
closes:  #19748

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoCI: make dependabot monitor `.github/actions` directory
ichizok [Thu, 19 Mar 2026 19:03:40 +0000 (19:03 +0000)] 
CI: make dependabot monitor `.github/actions` directory

and also set `cooldown`, `groups`

related: #19747
closes:  #19756

Signed-off-by: Ozaki Kiichi <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0199: tests: test_startup.vim fails v9.2.0199
Christian Brabandt [Thu, 19 Mar 2026 18:54:09 +0000 (18:54 +0000)] 
patch 9.2.0199: tests: test_startup.vim fails

Problem:  tests: test_startup.vim fails, because the command line is
          getting too long so that the shell prompt line get shifted by one
          additional screen line down (after v9.2.0194).
Solution: Partly revert Patch v9.2.0194 and do not set termresize and
          termsync options.

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0198: cscope: can escape from restricted mode v9.2.0198
Christian Brabandt [Wed, 18 Mar 2026 21:27:38 +0000 (21:27 +0000)] 
patch 9.2.0198: cscope: can escape from restricted mode

Problem:  cscope: can escape from restricted mode (pyllyukko)
Solution: Disallow :cscope in restricted mode (like :grep),
          add a tests for restricted mode using :grep and :cscope

closes: #19731

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(doc): Fix typo in if_pyth.txt
Barrett Ruth [Wed, 18 Mar 2026 21:22:46 +0000 (21:22 +0000)] 
runtime(doc): Fix typo in if_pyth.txt

closes: #19733

Signed-off-by: Barrett Ruth <br.barrettruth@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0197: tabpanel: frame width not updated for existing tab pages v9.2.0197
Hirohito Higashi [Wed, 18 Mar 2026 21:16:14 +0000 (21:16 +0000)] 
patch 9.2.0197: tabpanel: frame width not updated for existing tab pages

Problem:  When 'showtabpanel' is set before any window exists (e.g. via
          --cmd) and multiple tab pages are opened with -p, the tabpanel
          appears when the second tab page is created.  At that point
          shell_new_columns() only updates the current (new) tab page's
          frame width; existing tab pages retain the wrong width.
Solution: After calling shell_new_columns() in win_new_tabpage(), iterate
          all other tab pages and update their frame widths with
          frame_new_width() (Hirohito Higashi).

related: #19730
closes:  #19734

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(yara): add ftplugin for yara filetype
Thomas Dupuy [Wed, 18 Mar 2026 21:13:12 +0000 (21:13 +0000)] 
runtime(yara): add ftplugin for yara filetype

Add a minimal ftplugin `runtime/ftplugin/yara.vim` that sets:
- `commentstring` for YARA line comments (`//`)
- `comments` for YARA block comment (`/* */`)
- `formatoptions` to wrap comment lines and continue comment after newlines
This was heavily inspired from `runtime/ftplugin/c.vim`

closes: #19736

Signed-off-by: Thomas Dupuy <thom4s.d@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0196: textprop: negative IDs and can cause a crash v9.2.0196
Hirohito Higashi [Wed, 18 Mar 2026 21:03:17 +0000 (21:03 +0000)] 
patch 9.2.0196: textprop: negative IDs and can cause a crash

Problem:  textprop: negative IDs and can cause a crash without "text"
          (Paul Ollis)
Solution: Strictly reserve negative IDs for virtual text, ignore "id"
          when "text" is provided in prop_add() (Hirohito Higashi).

When prop_add() was called with a negative id and no "text", the
property was stored with a negative tp_id.  A subsequent call to
prop_list() or screen redraw would then treat it as a virtual text
property and dereference b_textprop_text.ga_data, which is NULL when
no virtual text properties exist.

Negative ids are reserved for virtual text properties, so always
reject them with E1293 regardless of whether virtual text properties
exist.  Also, when "text" is specified any user-provided id is now
silently ignored and an internal negative id is assigned.

Remove the now-unnecessary did_use_negative_pop_id flag and E1339.
Update E1293's message and the documentation accordingly.

related: #19684
closes:  #19741

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoCI: bump actions/upload-artifact to v7
ichizok [Wed, 18 Mar 2026 20:57:15 +0000 (20:57 +0000)] 
CI: bump actions/upload-artifact to v7

closes: #19747

Signed-off-by: Ozaki Kiichi <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0195: CI: test-suite gets killed for taking too long v9.2.0195
Christian Brabandt [Wed, 18 Mar 2026 20:47:45 +0000 (20:47 +0000)] 
patch 9.2.0195: CI: test-suite gets killed for taking too long

Problem:  test_codestyle.vim takes too much time and takes more than
          90s, this contributes to the overall time for all runners and
Solution: Create a dedicated 'make codestyle' target in the testdir
          Makefiles. Remove test_codestyle from the main test list.
          Update GitHub CI to run this check as a separate step
          in the 'normal' features build.
          Increase CI timeout to 45 minutes.

fixes: #19740

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0194: tests: test_startup.vim leaves temp.txt around v9.2.0194
Christian Brabandt [Wed, 18 Mar 2026 20:42:22 +0000 (20:42 +0000)] 
patch 9.2.0194: tests: test_startup.vim leaves temp.txt around

Problem:  tests: test_startup.vim leaves temp.txt around
Solution: Disable termresize and termsync explicitly to stop outputting
          DEC mode chars, delete all chars before the rm command

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0193: using copy_option_part() can be improved v9.2.0193
John Marriott [Wed, 18 Mar 2026 19:25:22 +0000 (19:25 +0000)] 
patch 9.2.0193: using copy_option_part() can be improved

Problem:  using copy_option_part() can be improved
Solution: Refactor and use the return value of copy_option_part() to
          avoid strlen() calls (John Marriott).

In addition, this commit includes the following changes:

memline.c:
- In recover_names():
  - Replace calls to vim_strsave() with vim_strnsave() for the literal
    strings
  - Use a string_T to store local variable dir_name.

bufwrite.c:
- In buf_write()
  - move variable wp to where it is used.

help.c:
- In fix_help_buffer():
  - replace call to add_pathsep() with after_pathsep()

optionstr.c:
- In export_myvimdir():
  - use a string_T to store local variable buf
  - replace call to add_pathsep() with after_pathsep()

scriptfile.c:
- In do_in_path():
  - use a string_T to store local variable buf
  - measure the lengths of prefix and name once before the while loop
  - replace call to add_pathsep() with after_pathsep()
  - move some variables closer to where they are used

spellfile.c:
- In init_spellfile():
  - use a string_T to store local variable buf

closes: #19725

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0192: not correctly recognizing raw key codes v9.2.0192
AstroSnail [Tue, 17 Mar 2026 21:24:43 +0000 (21:24 +0000)] 
patch 9.2.0192: not correctly recognizing raw key codes

Problem:  When "k" is excluded from cpoptions, vim should be able to
          recognize raw key codes in mappings and replace them with
          builtin codes (e.g. ^[OA is replaced with <Up>) so that
          changing the builtin code also changes the mapping to match.
          Currently, this only works properly if the builtin code does
          not contain modifiers (e.g. @;*).
Solution: Teach find_term_bykeys how to recognize keys with modifiers
          (AstroSnail).

fixes:  #19182
closes: #19643

Signed-off-by: AstroSnail <astrosnail@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0191: Not possible to know if Vim was compiled with Android support v9.2.0191
TomIO [Tue, 17 Mar 2026 21:08:44 +0000 (21:08 +0000)] 
patch 9.2.0191: Not possible to know if Vim was compiled with Android support

Problem:  The "android" and "termux" feature flags have been shipped in
          Termux's downstream vim / vim-gtk package for 5+ years but were
          never properly documented in the downstream patch.
Solution: Upstream the "android" and "termux" feature flags into Vim as
          decoupled feature flags, this enables the "android" feature in
          particular to be available independently of the "termux"
          feature for builds of Vim against the Android NDK, but not
          including the Termux NDK patchset.

closes: #19623

Co-authored-by: Lethal Lisa <43791059+lethal-lisa@users.noreply.github.com>
Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com>
Signed-off-by: TomIO <tom@termux.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0190: Status line height mismatch in vertical splits v9.2.0190
Hirohito Higashi [Tue, 17 Mar 2026 21:00:45 +0000 (21:00 +0000)] 
patch 9.2.0190: Status line height mismatch in vertical splits

Problem:  When 'laststatus' changes, the status line can become
          misaligned.
Solution: Update last_status_rec() to calculate the maximum status line
          height required across all windows in a vertical row.

closes: #19688

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0189: MS-Windows: opacity popups flicker during redraw in the console v9.2.0189
Yasuhiro Matsumoto [Tue, 17 Mar 2026 20:51:22 +0000 (20:51 +0000)] 
patch 9.2.0189: MS-Windows: opacity popups flicker during redraw in the console

Problem:  When using transparent popups in the Win32 console, redrawing
          background windows causes flickering. This happens because
          the background is drawn opaquely before the popup blends
          and draws on top.
Solution: Implement a Z-index mask  to suppress screen_char() output for
          cells covered by an opacity popup. Disable the Clear-to-EOL
          (T_CE) optimization for lines overlapping these popups to
          prevent accidental erasure (Yasuhiro Matsumoto).

closes: #19697
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0188: Can set environment variables in restricted mode v9.2.0188
pyllyukko [Tue, 17 Mar 2026 20:15:44 +0000 (20:15 +0000)] 
patch 9.2.0188: Can set environment variables in restricted mode

Problem:  Can set environment variables in restricted mode
Solution: Disallow setting environment variables using legacy Vim script
          (pyllyukko).

related: #13394
related: #19705
closes:  #19704

Signed-off-by: pyllyukko <pyllyukko@maimed.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0187: MS-Windows: rendering artifacts with DirectX renderer v9.2.0187
Yasuhiro Matsumoto [Tue, 17 Mar 2026 19:37:02 +0000 (19:37 +0000)] 
patch 9.2.0187: MS-Windows: rendering artifacts with DirectX renderer

Problem:  MS-Windows: rendering artifacts with DirectX renderer
Solution: Enable ETO_CLIPPED for DirectWrite rendering in
          gui_mch_draw_string() to ensure glyphs stay within their
          cell boundaries (Yasuhiro Matsumoto).

closes: #19711

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0186: heap buffer overflow with long generic function name v9.2.0186
Kaixuan Li [Tue, 17 Mar 2026 19:07:53 +0000 (19:07 +0000)] 
patch 9.2.0186: heap buffer overflow with long generic function name

Problem:   Using a long generic function name may cause a heap buffer
           overflow in common_function().
Solution:  Allocate memory for the full name instead of using IObuff
           (Kaixuan Li).

closes: #19727

Signed-off-by: Kaixuan Li <kaixuanli0131@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.2.0185: buffer overflow when redrawing custom tabline v9.2.0185
thinca [Tue, 17 Mar 2026 18:52:58 +0000 (18:52 +0000)] 
patch 9.2.0185: buffer overflow when redrawing custom tabline

Problem:  When drawing a custom tabline, if topframe->fr_width is
          larger than Columns (possible during tab closure with
          showtabpanel=1), Vim writes past the end of the
          TabPageIdxs[] array.
Solution: Cap the column limit at Columns to ensure TabPageIdxs is
          never accessed out-of-bounds (thinca).

closes: #19725

Supported by AI

Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(doc): Fix typo in cmdline.txt
elig0n [Mon, 16 Mar 2026 22:19:44 +0000 (22:19 +0000)] 
runtime(doc): Fix typo in cmdline.txt

closes: #19724

Signed-off-by: elig0n <31196036+elig0n@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0184: MS-Windows: screen flicker with termguicolors and visualbell v9.2.0184
Yasuhiro Matsumoto [Mon, 16 Mar 2026 22:06:47 +0000 (22:06 +0000)] 
patch 9.2.0184: MS-Windows: screen flicker with termguicolors and visualbell

Problem:  When 'termguicolors' is used on MS-Windows (VTP mode), sending
          CSI query sequences (like DECRQM) causes the console to
          generate responses that are misinterpreted as keystrokes.
          The leading ESC triggers a beep or 'visualbell' flash.
Solution: In mch_write(), discard CSI sequences when USE_VTP is active
          so the console does not process queries and generate unwanted
          input responses (Yasuhiro Matsumoto).

related: #11532
closes:  #19694

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0183: channel: using deprecated networking APIs v9.2.0183
Yasuhiro Matsumoto [Mon, 16 Mar 2026 21:59:40 +0000 (21:59 +0000)] 
patch 9.2.0183: channel: using deprecated networking APIs

Problem:  gethostbyname() and inet_ntoa() are deprecated and cause
          build errors on modern MSVC versions.
Solution: Use getaddrinfo() and inet_ntop() when FEAT_IPV6 and
          HAVE_INET_NTOP are defined. Keep the old functions as
          fallbacks for legacy platforms (Yasuhiro Matsumoto).

closes: #19719

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0182: autocmds may leave windows with w_locked set v9.2.0182
Sean Dewar [Mon, 16 Mar 2026 21:54:28 +0000 (21:54 +0000)] 
patch 9.2.0182: autocmds may leave windows with w_locked set

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: #19716

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0181: line('w0') moves cursor in terminal-normal mode v9.2.0181
ichizok [Mon, 16 Mar 2026 21:47:36 +0000 (21:47 +0000)] 
patch 9.2.0181: line('w0') moves cursor in terminal-normal mode

Problem:  line('w0') moves cursor in terminal-normal mode
          (Biebar, after v9.2.0127)
Solution: Check that the terminal is not in terminal-normal-mode
          (Ozaki Kiichi).

fixes:  #19717
closes: #19718

Signed-off-by: Ozaki Kiichi <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0180: possible crash with winminheight=0 v9.2.0180
Hirohito Higashi [Mon, 16 Mar 2026 21:41:47 +0000 (21:41 +0000)] 
patch 9.2.0180: possible crash with winminheight=0

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:  #19706
closes: #19712

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0179: MS-Windows: Compiler warning for converting from size_t to int v9.2.0179
ichizok [Mon, 16 Mar 2026 21:31:14 +0000 (21:31 +0000)] 
patch 9.2.0179: MS-Windows: Compiler warning for converting from size_t to int

Problem:  MS-Windows: Compile warning for converting from size_t to int
          breaks the Appveyor CI (after v9.2.0168)
Solution: Explicitly cast to int in convert_string() (ichizok).

closes: #19722

Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0178: DEC mode requests are sent even when not in raw mode v9.2.0178
Foxe Chen [Mon, 16 Mar 2026 21:25:10 +0000 (21:25 +0000)] 
patch 9.2.0178: DEC mode requests are sent even when not in raw mode

Problem:  Vim sends DEC mode query requests (DECRQM) regardless of the
          terminal mode.
Solution: Only send DEC mode requests when cur_tmode is TMODE_RAW, but
          e.g not for gui mode (Foxe Chen).

fixes:  #19709
closes: #19710

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0177: Vim9: Can set environment variables in restricted mode v9.2.0177
pyllyukko [Mon, 16 Mar 2026 21:19:08 +0000 (21:19 +0000)] 
patch 9.2.0177: Vim9: Can set environment variables in restricted mode

Problem:  Vim9: Can set environment variables in restricted mode
Solution: Disallow settings variables in exec_instructions() when in
          restricted mode (pyllyukko)

related: #13394
closes:  #19705

Signed-off-by: pyllyukko <pyllyukko@maimed.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0176: external diff is allowed in restricted mode v9.2.0176
pyllyukko [Mon, 16 Mar 2026 19:46:27 +0000 (19:46 +0000)] 
patch 9.2.0176: external diff is allowed in restricted mode

Problem:  When 'diffopt' does not include "internal", Vim attempts to
          execute an external diff command even in restricted mode.
          This could be used to bypass restricted mode.
Solution: Call check_restricted() in diff_file() before attempting to
          execute an external diff (pyllyukko).

closes: #19696

Signed-off-by: pyllyukko <pyllyukko@maimed.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0175: No tests for what v9.2.0141 and v9.2.0156 fixes v9.2.0175
Christian Brabandt [Mon, 16 Mar 2026 19:36:46 +0000 (19:36 +0000)] 
patch 9.2.0175: No tests for what v9.2.0141 and v9.2.0156 fixes

Problem:  No tests for what v9.2.0141 and v9.2.0156 fixes
Solution: Add tests for using :perldo and rubeval() in sandbox mode

related: #19664
related: #19653
closes:  #19699

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0174: diff: inline word-diffs can be fragmented v9.2.0174
HarshK97 [Mon, 16 Mar 2026 19:23:45 +0000 (19:23 +0000)] 
patch 9.2.0174: diff: inline word-diffs can be fragmented

Problem:  When using 'diffopt=inline:word', lines were excessively
          fragmented with punctuation creating separate highlight
          blocks, making it harder to read the diffs.
Solution: Added 'diff_refine_inline_word_highlight()' to merge
          adjacent diff blocks that are separated by small gaps of
          non-word characters (up to 5 bytes by default) (HarshK97).

When using inline:word diff mode, adjacent changed words separated by
punctuation or whitespace are now merged into a single highlight block
if the gap between them contains fewer than 5 non-word characters.

This creates more readable diffs and closely matches GitHub's own diff
display.

closes: #19098

Signed-off-by: HarshK97 <harshkapse1234@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0173: tests: Test_balloon_eval_term_visual is flaky v9.2.0173
Christian Brabandt [Sun, 15 Mar 2026 15:42:34 +0000 (15:42 +0000)] 
patch 9.2.0173: tests: Test_balloon_eval_term_visual is flaky

Problem:  tests: Test_balloon_eval_term_visual is flaky
Solution: Use redraw and WaitForAssert() to make it more reliable

Previously, it failed about 1 out of 4 runs for me, now I got it down to
1 out of 10. It's not perfect, but better than before.

closes: #19692

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0172: Missing semicolon in os_mac_conv.c v9.2.0172
Yasuhiro Matsumoto [Sun, 15 Mar 2026 15:35:01 +0000 (15:35 +0000)] 
patch 9.2.0172: Missing semicolon in os_mac_conv.c

Problem:  Missing semicolon in os_mac_conv.c (after v9.2.0168)
Solution: Add it (Yasuhiro Matsumoto).

The missing semicolon was introduced in patch 9.2.0168
(b00f441e6), which breaks the macOS build.

closes: #19695

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0171: MS-Windows: version detection is deprecated v9.2.0171
Mao-Yining [Sun, 15 Mar 2026 09:49:33 +0000 (09:49 +0000)] 
patch 9.2.0171: MS-Windows: version detection is deprecated

Problem:  MS-Windows: GetVersionEx() is deprecated since Windows 8.
          Version checks for specific features (like dark mode or title
          bar colors) are duplicated across files using multiple boolean flags.
Solution: Use RtlGetVersion() to centralize detection in a single
          win_version variable. Use the MAKE_VER() macro to check
          against major, minor, and build numbers. Update titlebar
          colors and dark theme to use proper version thresholds
          (Mao-Yining).

closes: #19673

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agotranslation(zh_CN): Fix translation for 'paste' in zh_CN.UTF-8.po
Murasame [Sun, 15 Mar 2026 09:38:31 +0000 (09:38 +0000)] 
translation(zh_CN): Fix translation for 'paste' in zh_CN.UTF-8.po

Corrected the translation for 'paste' from '粘帖' to '粘贴'.

In Chinese, the correct term for the computer action "paste" is 粘贴
(zhān tiē). The original translation used 粘帖, which contains a very
common typo. The second character was mistakenly written as 帖 (which
means a note or invitation) instead of the correct character 贴 (which
means to stick or paste).

closes: #19689

Signed-off-by: Murasame <88932464+CuteMurasame@users.noreply.github.com>
Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(doc): Update help tags references
Christian Brabandt [Sun, 15 Mar 2026 09:34:54 +0000 (09:34 +0000)] 
runtime(doc): Update help tags references

related: #19691

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0170: channel: some issues in ch_listen() v9.2.0170
Yasuhiro Matsumoto [Sun, 15 Mar 2026 09:22:29 +0000 (09:22 +0000)] 
patch 9.2.0170: channel: some issues in ch_listen()

Problem:  channel: some issues in ch_listen()
          (char101, after v9.2.0153)
Solution: On MS-Windows, initialize using channel_init_winsock() and use
          SO_EXCLUSIVEADDRUSE instead of SO_REUSEADDR, allow to use port
          0 to have the OS assign a port (Yasuhiro Matsumoto).

related: #19231
closes:  #19690

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(doc): clarify :silent usage for system()/systemlist()
Yasuhiro Matsumoto [Sun, 15 Mar 2026 09:16:42 +0000 (09:16 +0000)] 
runtime(doc): clarify :silent usage for system()/systemlist()

When system() or systemlist() is called without :silent from a
statusline expression, autocommand, or timer callback, the terminal
is temporarily set to cooked mode, which re-enables ECHO on the tty.
If a terminal response (e.g. DECRPM for cursor blink mode) arrives
during this window, the tty driver echoes it to the screen, leaving
stray characters that require CTRL-L to remove.

This behavior was intentionally addressed in patch 7.4.427 by
skipping cooked mode when :silent is prepended.  However, the
documentation only mentioned this for system() and did not cover
systemlist() at all.  The guidance to use :silent in non-interactive
contexts (statusline, autocommands, timers) was also not explicit.

closes #19691

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0169: assertion failure in syn_id2attr() v9.2.0169
Foxe Chen [Sun, 15 Mar 2026 09:05:14 +0000 (09:05 +0000)] 
patch 9.2.0169: assertion failure in syn_id2attr()

Problem:  assertion failure in syn_id2attr()
          (@julio-b, after v9.2.0093)
Solution: Set tp_curwin to a valid window in popup_close_tabpage()
          and return early in update_winhighlight() if there are
          no highlight overrides to update (Foxe Chen).

fixes:  #19650
closes: #19670

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0168: invalid pointer casting in string_convert() arguments v9.2.0168
James McCoy [Sun, 15 Mar 2026 08:58:11 +0000 (08:58 +0000)] 
patch 9.2.0168: invalid pointer casting in string_convert() arguments

Problem:  invalid pointer casting in string_convert() arguments
Solution: Use a temporary local int variable (James McCoy)

string_convert()/string_convert_ext() accept an "int *lenp" parameter,
however a few call sites were taking the address of a possibly larger
type (long, size_t) and casting it as an int * when calling these
functions.

On big-endian platforms, this passes the (likely) zeroed high bytes of
the known length through to string_convert(). This indicates it received
an empty string and returns an allocated empty string rather than
converting the input. This is exhibited by test failures like

  From test_blob.vim:
  Found errors in Test_blob2str_multi_byte_encodings():
  command line..script src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_blob2str_multi_byte_encodings line 2: Expected ['Hello'] but got ['']
  command line..script src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_blob2str_multi_byte_encodings line 3: Expected ['Hello'] but got ['']
  command line..script srctestdir/runtest.vim[636]..function RunTheTest[63]..Test_blob2str_multi_byte_encodings line 6: Expected ['Hello'] but got ['']

Instead, use a temporary local int variable as the in/out variable for
string_convert() and assign the result back to the larger typed length
variable post-conversion.

closes: #19672

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0167: terminal: setting buftype=terminal may cause a crash v9.2.0167
Christian Brabandt [Sat, 14 Mar 2026 17:31:45 +0000 (17:31 +0000)] 
patch 9.2.0167: terminal: setting buftype=terminal may cause a crash

Problem:  setting buftype=terminal may cause a crash
          (lacygoill, after v9.2.0127)
Solution: Validate that curwin->w_buffer->b_term is not null

fixes:  #19686
closes: #19676

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0166: Coverity warning for potential NULL dereference v9.2.0166
Christian Brabandt [Sat, 14 Mar 2026 17:27:47 +0000 (17:27 +0000)] 
patch 9.2.0166: Coverity warning for potential NULL dereference

Problem:  Coverity warning for potential NULL dereference in channel.c
          (after v9.2.0153)
Solution: Use empty string in case hostname is NULL.

CID: 1686330

related: #19676

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0165: tests: perleval fails in the sandbox v9.2.0165
Christian Brabandt [Sat, 14 Mar 2026 17:23:04 +0000 (17:23 +0000)] 
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: #19676

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.2.0164: build error when XCLIPBOARD is not defined v9.2.0164
Christian Brabandt [Sat, 14 Mar 2026 17:10:21 +0000 (17:10 +0000)] 
patch 9.2.0164: build error when XCLIPBOARD is not defined

Problem:  build error when XCLIPBOARD is not defined
          (Tony Mechelynck, after v9.2.0158)
Solution: Update ifdefs

related: #19676

Signed-off-by: Christian Brabandt <cb@256bit.org>