Foxe Chen [Sat, 13 Dec 2025 17:14:59 +0000 (18:14 +0100)]
patch 9.1.1976: Cannot define callbacks for redraw events
Problem: When using listeners, there is no way to run callbacks at
specific points in the redraw cycle.
Solution: Add redraw_listener_add() and redraw_listener_remove() and
allow specifying callbacks for redraw start and end
(Foxe Chen).
closes: #18902
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Foxe Chen [Fri, 12 Dec 2025 07:44:14 +0000 (08:44 +0100)]
patch 9.1.1973: some minor problems with clipboard provider code
Problem: some minor problems with clipboard provider code
(after v9.1.1972)
Solution: Fix minor issues (Foxe Chen)
- allow empty register type for paste function to mean automatic
- fix internal inc_clip_provider() and dec_clip_provider() functions not
setting the pause count correctly
- don't call paste function when yanking
closes: #18909
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Thu, 11 Dec 2025 19:45:09 +0000 (20:45 +0100)]
patch 9.1.1971: Crash when buffer gets deleted inside charconvert during save
Problem: Crash when buffer gets deleted inside charconvert during save
Solution: Check for `b_saving` inside `can_unload_buffer()`, so we don’t try to
unload a buffer while it’s still being saved (glepnir).
closes: #18901
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Thu, 11 Dec 2025 19:28:48 +0000 (20:28 +0100)]
patch 9.1.1969: Wrong cursor position after formatting with long 'formatprg'
Problem: Wrong cursor position after formatting with long 'formatprg'.
Solution: Don't show hit-enter prompt when there are stuffed characters.
Previously a stuffed character at the hit-enter prompt will dismiss the
prompt immediately and be put in the typeahead buffer, which leads to
incorrect behavior as the typeahead buffer is processed after the stuff
buffers. Using vungetc() when KeyStuffed is TRUE can fix this problem,
but since the hit-enter prompt isn't visible anyway (and is likely not
desired here), just skip the prompt instead, which also avoids a wait
when using "wait" instead of "hit-enter" in 'messagesopt'.
fixes: #18905
closes: #18906
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1965: q can accidentally start recording at more prompt
Problem: When exiting at the end of the more prompt (at the hit enter
prompt) by hitting q the recording mode will be started.
(Jakub Łuczyński)
Solution: Don't add the q key to the typeahead buffer
in the function wait_return (Bjoern Foersterling)
fixes: #2589
closes: #18889
Signed-off-by: Bjoern Foersterling <bjoern.foersterling@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Tue, 9 Dec 2025 12:10:12 +0000 (13:10 +0100)]
patch 9.1.1964: Wrong display when using setline() at hit-enter prompt
Problem: Wrong display when using setline() at hit-enter prompt
(after 8.2.3204).
Solution: Only skip scrolling for changed lines in top area if it's
scrolled down due to w_topline change. Also add more testing
for what 8.2.3204 fixed (zeertzjq).
closes: #18887
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1963: diff: missing diff size limit for xdiff
Problem: diff: missing diff size limit for xdiff
Solution: Impose file size limit for internal diff (xdiff)
(Yee Cheng Chin).
Git imposes a hard cap on file size for content that it passes to xdiff
(added to Git in dcd1742e56e, defined in xdiff-interface.h), due to
integer overflow concerns in xdiff. Vim doesn't specify such a limit
right now, which means it's possible for a user to diff a large file
(1GB+) and trigger these overflow issues.
Add the same size limit (1GB minus 1MB) to Vim and simply throws an
error when Vim encounters files larger than said limit. For now, reuse
the same error message regarding internal diff failures. There is no
need to add the same limit for external diff as it's up to each tool to
error check their input to decide what is appropriate or not.
closes: #18891
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Port changes from JuliaEditorSupport/julia-vim made during 2022-2025.
Most notably:
- 88f178c Do not reset shiftwidth/expandtab at undo
- f17257a Allow else block in try/catch
- 7946ce3 Support public statements (added in Julia v1.11.0-DEV.469)
Signed-off-by: Sergio Alejandro Vargas <savargasqu+git@unal.edu.co> Signed-off-by: Christian Brabandt <cb@256bit.org>
Aaron Jacobs [Tue, 9 Dec 2025 11:43:39 +0000 (12:43 +0100)]
runtime(rust): use textwidth=100 for the Rust recommended style
The help text here said 99 was the recommended style for the standard
library, but I can't find a citation for this anywhere. In contrast the
Rust Style Guide hosted on rust-lang.org
[says](https://doc.rust-lang.org/stable/style-guide/#indentation-and-line-width)
the maximum line width is 100, and rustfmt
[agrees](https://github.com/rust-lang/rust/blob/37aa2135b5d0936bd13aa699d941aaa94fbaa645/src/tools/rustfmt/src/config/options.rs#L570).
Having the two disagree causes an annoying off-by-one error in vim: if
you configure vim to highlight too-long lines then it will occasionally
complain about a line that rustfmt refuses to fix.
closes: #18892
Signed-off-by: Aaron Jacobs <jacobsa@google.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Sun, 7 Dec 2025 17:54:26 +0000 (18:54 +0100)]
patch 9.1.1960: Wrong position of info popup
Problem: When the popup menu is displayed above the cursor and the
selected item has no room below for the info popup,
popup_adjust_position() places the popup in the available
space above. The calculation added some extra lines, causing
the popup to be misaligned.
Solution: For info popups, undo that extra spacing so the popup stays
aligned with the selected item (glepnir)
closes: #18860
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Sun, 7 Dec 2025 17:48:22 +0000 (18:48 +0100)]
patch 9.1.1959: Wrong wrapping of long output using :echowindow
Problem: Outputting long strings using :echowindow wraps one character
per line and display in reverse order (Hirohito Higashi)
Solution: Use full width for :echowindow, reset msg_col after wrapping,
and increment lnum correctly when creating new lines (glepnir)
fixes: #18750
closes: #18874
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Sun, 7 Dec 2025 17:45:19 +0000 (18:45 +0100)]
patch 9.1.1958: Wrong display with sign_unplace() and setline() in CursorMoved
Problem: Wrong display when scrolling with 'scrolloff' and calling
sign_unplace() and setline() in CursorMoved (after 8.2.3204).
Solution: Still scroll for changed lines below the top area when the top
is scrolled down (zeertzjq)
closes: #18878
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1957: filetype: bpftrace files are not recognized
Problem: filetype: bpftrace files are not recognized
Solution: Detect *.bt files as btftrace filetype,
include a btftrace filetype plugin (Stanislaw Gruszka)
closes: #18866
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Christian Brabandt <cb@256bit.org>
Maxim Kim [Sat, 6 Dec 2025 09:36:30 +0000 (10:36 +0100)]
runtime(odin): support underscore-separated numeric literals
Add support for underscore-separated numeric literals in Odin syntax
highlighting. This allows proper highlighting of numbers like 1_000_000,
0xFF_AA_BB, and 0b1010_1111 as specified in the Odin language.
> Numerical literals are written similar to most other programming
> languages. A useful feature in Odin is that underscores are allowed
> for better readability: 1_000_000_000 (one billion).
> https://odin-lang.org/docs/overview/#numbers
closes: #18852
Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1955: sort() does not handle large numbers correctly
Problem: sort() does not handle large numbers correctly
(Igbanam Ogbuluijah)
Solution: Don't truncate the return value of tv_get_number_chk()
(Yegappan Lakshmanan)
closes: #18868
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Josef Litoš [Wed, 3 Dec 2025 21:10:02 +0000 (21:10 +0000)]
runtime(swayconfig): separate identifier groups + cleanup
- cleanup of PR for tearing and other output options
- removed `allow_tearing` from global keywords (it's only an output option)
- moved `...clockwise` directives from general to transform options
- separated `icc` highlight to correctly detect and highlight paths
- updated output bg to use the same approach as `icc` for file path
- separated all identifier-matchers into their own groups
- added support for bar identifiers
closes: #18851
Signed-off-by: Josef Litoš <54900518+litoj@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
- mapped all identifier-highlighting groups to a new group `i3ConfigIdent`
- i3config bar is now split into keyword and block matches
- support `xft:` namespace in fonts
- Update maintainer information in i3config.vim
related: #18851
Signed-off-by: Josef Litoš <54900518+litoj@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Wed, 3 Dec 2025 20:10:07 +0000 (20:10 +0000)]
patch 9.1.1951: tests: Test_windows_external_cmd_in_cwd() only run in huge builds
Problem: tests: Test_windows_external_cmd_in_cwd() is only run in huge
builds (after 9.1.1947).
Solution: Move it to test_system.vim so that it is run in normal builds.
closes: #18853
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1949: :stag does not use 'swichtbuf' option
Problem: :stag does not use 'swichtbuf' option, though the
documentation states differently
(Christian Brabandt)
Solution: Respect 'switchbuf' option (Yegappan Lakshmanan).
related: #18845
closes: #18856
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1948: Windows: Vim adds current directory to search path
Problem: Windows: Vim always adds the current directory to search path.
This should only happen when using cmd.exe as 'shell'. For
example, powershell won't run binaries from the current
directory.
Solution: Only add current directory to system path, when using cmd.exe
as 'shell'.
patch 9.1.1947: [security]: Windows: Vim may execute commands from current directory
Problem: [security]: Windows: Vim may execute commands from current
directory (Simon Zuckerbraun)
Solution: Set the $NoDefaultCurrentDirectoryInExePath before running
external commands.
Peter Kenny [Tue, 2 Dec 2025 20:42:53 +0000 (20:42 +0000)]
patch 9.1.1946: Cannot open the help in the current window
Problem: Cannot open the help in the current window
Solution: Promote the example from tips.txt to a proper package and
include the helpcurwin package, add tests for it
(Peter Kenny)
closes: #18840
Signed-off-by: Peter Kenny <github.com@k1w1.cyou> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1944: getwininfo() does not return if statusline is visible
Problem: gewininfo() does not return if statusline is visible
Solution: Add status_height to the dict items returned by
getwininfo() (Hirohito Higashi)
closes: #18841
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Mon, 1 Dec 2025 19:43:05 +0000 (19:43 +0000)]
patch 9.1.1943: Memory leak with :breakadd expr
Problem: Memory leak with :breakadd expr
Solution: Free debug_oldval and debug_newval before assigning to them.
Verify the existing (though confusing) :breakadd expr behavior
(zeertzjq).
It seems that :breakadd expr doesn't work as documented at all. This PR
only fixes the memory leak. The tests are for the existing behavior.
closes: #18844
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Doug Kearns [Sun, 30 Nov 2025 15:26:22 +0000 (15:26 +0000)]
patch 9.1.1942: Vim9: Assignment to read-only registers @: and @% is allowed
Problem: Assignment to read-only registers @: and @% is allowed during
compilation.
Solution: Abort compilation and emit an E354 error when assigning to
these registers (Doug Kearns).
Fix the E354 error emitted when attempting to declare @: with :var so
that it references the correct register, @:, rather than the garbage
string "^@".
Corey Hickey [Sun, 30 Nov 2025 15:16:16 +0000 (15:16 +0000)]
patch 9.1.1940: clipboard registers "+" and "*" synced without "autoselect"
Problem: clipboard registers "+" and "*" synced without "autoselect"
Solution: Remove code that explicitly syncs those clipboard registers
(Corey Hickey)
Before this change, writes to '+' get copied to '*', but only under
certain conditions. By default, this does not happen, because clipboard
"autoselect" (via :set clipboard+=autoselect) is enabled. Disabling
"autoselect" (an option which should only apply to visual mode) results
in normal-mode writes such as "+yy also going to the '*' register.
This behavior is undocumented and untested; remove the behavior in order
to make Vim's handling of these two registers be consistent.
This frees up the did_star variable to be removed.
Add a test to check that the registers are independent.
fixes: #18830
closes: #18831
Signed-off-by: Corey Hickey <bugfood-c@fatooh.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
Corey Hickey [Sun, 30 Nov 2025 15:07:40 +0000 (15:07 +0000)]
patch 9.1.1938: tests: excessive wait in Test_matchfuzzy_initialized
Problem: tests: excessive wait in Test_matchfuzzy_initialized
Solution: Use term_wait() instead of the TermWait() wrapper
(Corey Hickey)
Test_matchfuzzy_initialized is a terminal test, which are specified to be
"flaky" and automatically retried. The TermWait wrapper multiplies the
specified wait time by higher values for later retries, maxing out at
10x the specified value. This makes tries #3 to #6 sleep for 20 seconds
each, which makes the test very slow to work with. The specified intent
of the test (as noted in a comment eight lines above here) is to
sleep for 2s.
closes: #18822
Signed-off-by: Corey Hickey <bugfood-c@fatooh.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
Test_matchfuzzy_initialized seems to expect that the 'lvimgrep' will be
interrupted by sending a SIGINT. If the search finishes beforehand,
though, then the SIGINT triggers vim to tell the user how to quit.
Vim does not show this message immediately, though; instead, vim shows
the message next time it is active. When StopVimInTerminal() sends a key
sequence intended to cause vim to quit, this activates vim to show the
message instead of quitting.
I do not understand every detail of the problem fully--if I type the
characters from StopVimInTerminal() into a post-SIGTERM terminal
directly, that seems to work ok; there seems to be a timing issue due to
sending all the characters at once.
This fix does make the test work reliably for me, and the test still
works even if I limit my CPU frequency so that the search is interrupted
by the SIGINT.
fixes: #18821
related: #18822
Signed-off-by: Corey Hickey <bugfood-c@fatooh.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
Jon Parise [Sun, 30 Nov 2025 14:45:48 +0000 (14:45 +0000)]
patch 9.1.1936: filetype: Erlang lexical files are not recognized
Problem: filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
filetype plugins (Jon Parise).
leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.
This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.
Jon Parise [Sun, 30 Nov 2025 10:02:45 +0000 (10:02 +0000)]
patch 9.1.1935: filetype: not all Erlang files are recognized
Problem: filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
(John Parise).
*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)
Girish Palya [Thu, 27 Nov 2025 21:19:54 +0000 (21:19 +0000)]
patch 9.1.1933: completion: complete_match() is not useful
Problem: completion: complete_match() Vim script function and
'isexpand' option are not that useful and confusing
(after v9.1.1341)
Solution: Remove function and option and clean up code and documentation
(Girish Palya).
complete_match() and 'isexpand' add no real functionality to Vim. They
duplicate what `strridx()` already does, yet pretend to be part of the
completion system. They have nothing to do with the completion mechanism.
* `f_complete_match()` in `insexpand.c` does not call any completion code.
It’s just a `STRNCMP()` wrapper with fluff logic.
* `'isexpand'` exists only as a proxy argument to that function.
It does nothing on its own and amounts to misuse of a new option.
The following Vim script function can be used to implement the same
functionality:
```vim
func CompleteMatch(triggers, sep=',')
let line = getline('.')->strpart(0, col('.') - 1)
let result = []
for trig in split(a:triggers, a:sep)
let idx = strridx(line, trig)
if l:idx >= 0
call add(result, [idx + 1, trig])
endif
endfor
return result
endfunc
```
related: #16716
fixes: #18563
closes: #18790
Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Girish Palya [Wed, 26 Nov 2025 21:00:16 +0000 (21:00 +0000)]
patch 9.1.1930: completion: 'completefuzzycollect' is too obscure
Problem: completion: 'completefuzzycollect' option is too obscure
Solution: Deprecate the option, but don't error out for existing scripts,
behave like 'completefuzzycollect' is set when fuzzy
completion is enabled (Girish Palya).
fixes: #18498
closes: #18788
Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Robertus Chris [Wed, 26 Nov 2025 20:37:09 +0000 (20:37 +0000)]
runtime(i3config/swayconfig): add all option for i3config only
Since i3 version 4.24, popup_during_fullscreen has new
option `all`. So add the `all` option for popup_during_fullscreen to
prevent `all` option highlighted as error.
However, sway won't implement `all` option for popup_during_fullscreen,
so let's remove the extra options from the syntax cluster in swayconfig
syntax script after sourcing the i3config.
Brent Pappas [Wed, 26 Nov 2025 20:12:28 +0000 (20:12 +0000)]
runtime(doc): Fix typo in "Jumping to Changes", usr_08.txt
- Change "Prepended" (past tense) to "Prepend" (present tense,
imperative).
- Add short examples clarifying the behavior of prepending a count to
commands that jump to changes in diff mode.
closes: #18810
Signed-off-by: Brent Pappas <pappasbrent@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Philip H. [Sun, 23 Nov 2025 19:35:12 +0000 (19:35 +0000)]
Update link to XDG base specification in option.c comment
closes: #18789
Co-authored-by: dkearns <dougkearns@gmail.com> Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
These options support environment variable expansion in their values
(e.g., $HOME, $USER) but the documentation didn't explicitly mention
this capability. This brings their documentation in line with other
options like backupdir, directory, and makeprg that already include
this note.
closes: #18791
Signed-off-by: Alex Plate <AlexPl292@gmail.com> Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1926: xdiff: Coverity warning with MAX_CNT/UINT_MAX usage
Problem: xdiff: Coverity warning with MAX_CNT/UINT_MAX usage
(after v9.1.1921)
Solution: Replace XDL_MIN macro to a manual check.
(Yee Cheng Chin)
In the recent xdiff upstream sync (#18765), MAX_CNT in xhistogram was
switched back to using UINT_MAX to match upstream. This exposed an issue
in xdiff that using using min() to compare against the max integer will
not work as the number will just overflow. Switch the check to be done
in a saturating add that respects integer overflow.
related: #18765
closes: #18792
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>