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#19663closes: vim/vim#197134292eea714
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
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#18495closes: vim/vim#19783e2f4e18437
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: No 'incsearch' highlighting support for :uniq
Solution: Add :uniq support (Hirohito Higashi)
closes: vim/vim#1978048137e4e48
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
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/justcloses: vim/vim#19773e147b635fc
Co-authored-by: Aditya Malik <adityamalik2833@gmail.com>
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#197855a3b75d67b
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#19742closes: vim/vim#19744332dd22ed4
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
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#19706closes: vim/vim#19712a5d9654620
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
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#19716bae31c35bb
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.
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.
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.
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#196135890ea5397
AI-assisted: Codex
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
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#153342979cfc262
Co-authored-by: Christian Brabandt <cb@256bit.org>
AI-assisted: Codex
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.
Problem: tests: perleval fails in the sandbox
(after v9.2.0156)
Solution: Update tests and assert that it fails
related: vim/vim#196763f89324b3a
Co-authored-by: Christian Brabandt <cb@256bit.org>
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>
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-778r36d6e87542
Co-authored-by: Christian Brabandt <cb@256bit.org>
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#19620ff16ebdb08
Co-authored-by: James McCoy <jamessan@debian.org>
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#1959324fd698045
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>
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#19608123a1e6410
Co-authored-by: Christian Brabandt <cb@256bit.org>
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>
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#195575845741d69
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#195494b30e40a1f
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#190948526d32647
Co-authored-by: HarshK97 <harshkapse1234@gmail.com>
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#19525eba078fc47
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-jj5p65c1a143c3
Co-authored-by: Christian Brabandt <cb@256bit.org>
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-hvwv9b7dfa2948
Co-authored-by: Christian Brabandt <cb@256bit.org>
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-hj8jf6a7f469a9
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>
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>
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#6135fixes: vim/vim#7244closes: vim/vim#15120f3daa4525b
Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>
Problem: Not possible to know when a session will be loaded.
Solution: Add the SessionLoadPre autocommand (Colin Kennedy).
fixes: vim/vim#19084closes: vim/vim#193061c0d468d72
Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
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.
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#19260d0fa375629
Co-authored-by: DuckAfire <155199080+duckafire@users.noreply.github.com>
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#19434closes: vim/vim#19443d8648f7279
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
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#19328closes: vim/vim#19447a04ae0210b
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Problem: matchadd() conceal may use unrelated syntax cchar.
Solution: Only use syntax cchar when syntax_flags has HL_CONCEAL
(zeertzjq).
closes: vim/vim#19459d01f234ec1