With "v9.1.2134" applied, arbitrary multibyte characters are
not replaced with spurious U+FFFD characters (typically when
the host system is under load); U+FFFD characters that are
intentionally written in an input file continue to remain
present for later output and comparison. The workaround of
"v9.1.1592~3" is no longer necessary.
Also prefer "page_nr" to "nr" in syntax/testdir/runtest.vim
closes: #19348
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2139: Buffer overflow in :wlrestore command
Problem: Buffer overflow in :wlrestore command, caused by assuming
wrong buffer length in vwl_log_handler() (Seungyeon Park)
Solution: Use correct buffer size (512 bytes) in vim_vsnprintf()
to properly truncate long messages.
Ingo Karkat [Sat, 7 Feb 2026 10:41:32 +0000 (10:41 +0000)]
patch 9.1.2138: win_execute() and 'autochdir' can corrupt buffer name
Problem: With 'autochdir' win_execute() can corrupt the buffer name,
causing :write to use wrong path.
Solution: Save and restore b_fname when 'autochdir' is active
(Ingo Karkat).
This is caused by a bad interaction of the 'autochdir' behavior,
overriding of the current directory via :lchdir, and the temporary
window switching done by win_execute(), manifesting when e.g. a custom
completion inspects other buffers:
1. In the initial state after the :lcd .. we have curbuf->b_fname =
"Xsubdir/file".
2. do_autochdir() is invoked, temporarily undoing the :lcd .., changing
back into the Xsubdir/ subdirectory.
3. win_execute() switches windows, triggering win_enter_ext() →
win_fix_current_dir() → shorten_fnames(TRUE)
4. shorten_fnames() processes *all* buffers
5. shorten_buf_fname() makes the filename relative to the current
(wrong) directory; b_fname becomes "file" instead of "Xsubdir/file"
6. Directory restoration correctly restores working directory via
mch_chdir() (skipping a second do_autochdir() invocation because
apply_acd is FALSE), but b_fname remains corrupted, with the
"Xsubdir/" part missing.
7. expand("%:p") (and commands like :write) continue to use the
corrupted filename, resolving to a wrong path that's missing the
"Xsubdir/" part.
To fix the problem the short filename is saved if its in effect (i.e.
pointed to by curbuf->b_fname) and 'autochdir' happened. It's then
restored in case of a local cwd override. The conditions limit this
workaround to when 'autochdir' is active *and* overridden by a :lchdir.
Kevin Goodsell [Sat, 7 Feb 2026 10:30:33 +0000 (10:30 +0000)]
patch 9.1.2137: test: Update tests for OpenBSD
Problem: Some tests are not valid on OpenBSD.
Solution: Add CheckNotOpenBSD, use it to skip certain tests
(Kevin Goodsell).
Test_readdirex_sort performs locale-dependent sorting. OpenBSD has
minimal locale support.
Test_stdin_no_newline hangs on OpenBSD and FreeBSD. I don't know exactly
why, but it may be due to bash not exiting at the end of the test. This
is skipped in the FreeBSD CI runs because bash is not installed.
Test_detect_fifo uses /dev/fd/ files (via process substitution) as
FIFOs. On OpenBSD the files in /dev/fd are not FIFOs.
closes: #19351
Signed-off-by: Kevin Goodsell <kevin-opensource@omegacrash.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Sat, 7 Feb 2026 10:20:51 +0000 (10:20 +0000)]
patch 9.1.2136: :tab sbuffer may close old tabpage
Problem: :tab sbuffer may close old tabpage if BufLeave autocommand
splits window (after 9.1.0143).
Solution: Only close other windows if the buffer will be unloaded
(zeertzjq).
related: neovim/neovim#37749
closes: #19352
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(doc): clarify term_cols allowed range in terminal.txt
Patch 9.0.1527 (related issue: vim/vim#12362) introduced range checking
for `term_cols` parameter of the various terminal related functions, but
did not update the documentation. This is the fix, hopefully I found
everything that mentions is. Also improve the style for `term_rows` to
match.
The translation file should not be included with Vims runtime files.
Translated help files should be made available via a separate project,
like what has been mentioned here:
https://www.vim.org/translations.php
Kevin Goodsell [Fri, 6 Feb 2026 10:00:13 +0000 (10:00 +0000)]
patch 9.1.2135: tests: tar plugin does not consider 'nowrapscan'
Problem: search() is used to check for the message from tar that
indicates leading slashes found in the tar archive, or to
check for the leading slashes themselves. However, if
'nowrapscan' is in effect these searches are limited to the
last line and don't find any results. This causes the warning
message from tar to be seen in the buffer, the "Path Traversal
Attack Detected" message to be omitted, and editing actions
can fail. This can be seen, for example, when editing
src/testdir/samples/evil.tar.
Solution: Use the 'w' flag for search() (Kevin Goodsell)
closes: #19333
Signed-off-by: Kevin Goodsell <kevin-opensource@omegacrash.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2132: [security]: buffer-overflow in 'helpfile' option handling
Problem: [security]: buffer-overflow in 'helpfile' option handling by
using strcpy without bound checks (Rahul Hoysala)
Solution: Limit strncpy to the length of the buffer (MAXPATHL)
Lifepillar [Wed, 4 Feb 2026 16:31:05 +0000 (16:31 +0000)]
runtime(context): fix issue with SyncTeX and update command
Remove `--nonstopmode` because (a) ConTeXt always stops anyway, and (b)
`--nonstopmode` disables SyncTeX unconditionally. Add `--paranoid`,
which prevents the command to descend to `..` and `../..`.
Pass the typesetting command only the name of the input file rather than
its full path, as that is more compatible with ConTeXt's syncing
mechanism.
closes: #19323
Signed-off-by: Lifepillar <lifepillar@lifepillar.me> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Wed, 4 Feb 2026 15:47:51 +0000 (15:47 +0000)]
patch 9.1.2130: Page scrolling in Insert mode beeps
Problem: Page scrolling in Insert mode beeps (after 9.1.0211).
Solution: Fix incorrect return value of pagescroll(). Also invert the
return value of scroll_with_sms() to be less confusing and
match comments (zeertzjq).
fixes: #19326
closes: #19327
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2129: MS-Windows: font size calculation slightly wrong, causing line gaps
Problem: MS-Windows: font size calculation slightly wrong, causing
vertical line gaps (Maxim Kim, after v9.1.2127)
Solution: Update font size calculation when using DirectX
(Yasuhiro Matsumoto).
Use pre-calculated font ascent from font metrics instead of fixed
formula (h * 0.83) to calculate text baseline. This prevents vertical
text shift when font fallback occurs with CJK characters.
closes: #19318
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Sean Dewar [Tue, 3 Feb 2026 15:00:12 +0000 (15:00 +0000)]
patch 9.1.2128: Heap use after free in buf_check_timestamp()
Problem: heap UAF if autocommands from reloading a file changed outside
of Vim wipe its buffer.
Solution: Validate the bufref after buf_reload (Sean Dewar)
closes: #19317
Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Mark Woods [Tue, 3 Feb 2026 14:48:58 +0000 (14:48 +0000)]
runtime(vim): Fix for :VimKeywordPrg when syntax does not match
When using vim9-syntax plugin, :VimKeywordPrg does not lookup functions
correctly, as it relies solely on syntax names to find the help topic.
The syntax keyword used for builtin function is vi9FuncNameBuiltin in
vim9-syntax plugin, not vimFuncName expected by :VimKeywordPrg, so the
fallback rules apply, and there is no fallback rule for function calls.
Fix by just checking if the first char after topic is '(', and if so
assume help topic is a function.
closes: #19320
Signed-off-by: Mark Woods <mwoods.online.ie@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2127: MS-Windows: DirectX renders font too small
Problem: MS-Windows: DirectX renders font too small in comparison to
the GDI rendering (Linwei, after v9.1.2125)
Solution: Implement proper font clipping (Yasuhiro Matsumoto)
related: #19254
closes: #19304
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2126: vim --version used single column for feature list
Problem: vim --version used single column for feature list
(Ben Knoble, after v9.1.1898)
Solution: Restore old behaviour and assume 80 columns, making sure
the feature list is shown in several columns
(Ben Knoble, Hirohito Higashi).
fixes: #19309
closes: #19315
Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2125: MS-Windows: DirectX rendering can be improved
Problem: MS-Windows: DirectX rendering can be improved
Solution: Use lpDx advance, fix vertical text shift and correct
font-size calculations (Yasuhiro Matsumoto).
This changes DirectWrite rendering to:
- Respect lpDx-provided advance widths instead of always adjusting to
cell width.
- Use a fixed baseline derived from cell geometry to prevent vertical
shifts when font fallback occurs (e.g. with CJK characters).
- Correctly convert LOGFONT lfHeight to DirectWrite font size using font
metrics for closer GDI compatibility.
closes: #19254
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2124: blob2str() does not handle UTF-16 encoding
Problem: blob2str() does not handle UTF-16 encoding
(Hirohito Higashi)
Solution: Refactor the code and fix remaining issues, see below
(Yasuhiro Matsumoto).
blob2str() function did not properly handle UTF-16/UCS-2/UTF-32/UCS-4
encodings with endianness suffixes (e.g., utf-16le, utf-16be, ucs-2le).
The encoding name was canonicalized too aggressively, losing the
endianness information needed by iconv.
This change include few fixes:
- Preserve the raw encoding name with endianness suffix for iconv calls
- Normalize encoding names properly: "ucs2be" → "ucs-2be", "utf16le" →
"utf-16le"
- For multi-byte encodings (UTF-16/32, UCS-2/4), convert the entire blob
first, then split by newlines
convert_string() cannot handle UTF-16 because it uses string_convert()
which expects NUL-terminated strings. UTF-16 contains 0x00 bytes within
characters (e.g., "H" = 0x48 0x00), causing premature termination.
Therefore, for UTF-16/32 encodings, the fix uses string_convert_ext()
with an explicit input length to convert the entire blob at once.
The code appends two NUL bytes (ga_append(&blob_ga, NUL) twice) because
UTF-16 requires a 2-byte NUL terminator (0x00 0x00), not a single-byte
NUL.
- src/strings.c: Add from_encoding_raw to preserve endianness, special
handling for UTF-16/32 and UCS-2/4
- src/mbyte.c: Fix convert_setup_ext() to use == ENC_UNICODE instead of
& ENC_UNICODE. The bitwise AND was incorrectly treating UTF-16/UCS-2
(which have ENC_UNICODE + ENC_2BYTE etc.) as UTF-8, causing iconv
setup to be skipped.
patch 9.1.2121: Vim9: type issue when modifying a variable using :legacy
Problem: Vim9: type issue when modifying a variable using :legacy
(kennypete)
Solution: In a vim9 script, when modifying a variable using the legacy
command, check the type (Yegappan Lakshmanan).
fixes: #18531
closes: #19292
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Kevin Goodsell [Fri, 30 Jan 2026 10:00:27 +0000 (10:00 +0000)]
patch 9.1.2119: tests: Test_language_cmd fails on OpenBSD
Problem: tests: Test_language_cmd fails on OpenBSD because the test
uses an invalid locale name and expects the command to produce
an error. OpenBSD accepts (almost) any locale name as valid by
design, so the :lang command succeeds and the test fails.
Solution: Slightly update the "bad" locale name to make it something
that OpenBSD considers invalid by adding a dot (but not ending
with ".UTF-8"). Maintain the original two underscores in the
name because that ensures Windows will also see it as invalid
(Kevin Goodsell).
closes: #19280
Signed-off-by: Kevin Goodsell <kevin-opensource@omegacrash.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Fri, 30 Jan 2026 09:57:56 +0000 (09:57 +0000)]
patch 9.1.2118: 'cursorline' missing after :diffput to empty buf
Problem: 'cursorline' and part of 'statusline' are missing after
:diffput to an empty buffer.
Solution: Make sure the cursor doesn't go beyond the last line after
:diffput (zeertzjq)
related: neovim/neovim#37621
closes: #19281
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: crash when using 'tagfunc' (Rodrigo Queipo)
Solution: Do not add the user_data to the 'info' dictionary when called
for insert mode completion (the TAG_INS_COMP flag is set).
Completion should not depend on the state of a previous tag
jump. (Yasuhiro Matsumoto)
fixes: #19255
closes: #19284
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Foxe Chen [Thu, 29 Jan 2026 19:10:51 +0000 (19:10 +0000)]
patch 9.1.2114: modeless selection not copied to * register
Problem: modeless selection not copied to * register when P in
guioptions (Coacher)
Solution: Make the "P" flag override the "a" and "A" flag
(Foxe Chen)
fixes: #19187
closes: #19244
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
taylor.fish [Wed, 28 Jan 2026 22:04:21 +0000 (22:04 +0000)]
runtime(rust): Fix Rust indentation when string contains "if"
indent/rust.vim behaves incorrectly when a string literal contains the
substring "if".
For example, in this code:
let x = "
motif
";
struct X {
}
indent/rust.vim thinks that the closing "}" should line up with "motif".
This patch fixes the issue by checking whether the "if" is in a string
literal or comment before considering it to be a match for a subsequent
brace (and also by requiring it to start on a word boundary).
Add an indent test to ensure this does not regress.
closes: #19265
Signed-off-by: taylor.fish <contact@taylor.fish> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Wed, 28 Jan 2026 21:36:51 +0000 (21:36 +0000)]
patch 9.1.2112: long statusline may crash if using singlebyte encoding
Problem: long statusline may crash if using singlebyte encoding
(fizz-is-on-the-way)
Solution: Drop the non-mbyte codepath and always use the mbyte code
(zeertzjq)
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Aman Verma [Sun, 25 Jan 2026 18:01:31 +0000 (18:01 +0000)]
runtime(toml): update syntax and ftplugin.
Add "-" to iskeyword. This required a change to the syntax files too
because they were using the word begin and end atoms.
closes: #17259
Co-authored-by: Teemu Ikonen <tpikonen@mailbox.org> Co-authored-by: A4-Tacks <wdsjxhno1001@163.com> Signed-off-by: Aman Verma <amanraoverma@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Kiyoon Kim [Sun, 25 Jan 2026 17:39:05 +0000 (17:39 +0000)]
patch 9.1.2110: filetype: skhd files are not recognized
Problem: filetype: skhd files are not recognized
Solution: Detect .skhdrc and skhdrc as skhd filetype,
include a syntax and filetype plugin, add syntax tests
(Kiyoon Kim)
Add syntax highlighting for skhd (simple hotkey daemon for macOS)
configuration files. Includes filetype detection for skhdrc and
.skhdrc files.
Reference:
- https://github.com/asmvik/skhd
closes: #19235
Signed-off-by: Kiyoon Kim <kiyoon@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
ThanhNguyxn [Sun, 25 Jan 2026 15:58:33 +0000 (15:58 +0000)]
runtime: convert *_utf-8.vim files to actual UTF-8 encoding
Several runtime files with "_utf-8" in their filename are actually encoded
in latin1 or cp1255, not UTF-8. This causes errors when tools attempt to
read these files as UTF-8.
zeertzjq [Fri, 23 Jan 2026 19:21:42 +0000 (19:21 +0000)]
patch 9.1.2107: :normal may change cmdline history
Problem: :normal may change cmdline history if the keys don't
explicitly leave Cmdline mode (after 9.1.1872).
Solution: Check ex_normal_busy (zeertzjq)
closes: #19237
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2106: Vim9: class, enum and type alias can be used as value
Problem: Vim9: class, enum and type alias can be used as value in an
expression (kennypete)
Solution: Abort expression evaluation if class, enum or type alias is
used in an expression (Yegappan Lakshmanan)
related: #19173
closes: #19238
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
- Allow for an unparenthesised expression argument to the 'if',
'if-then', and 'while' commands. This is undocumented, and probably
unintended, behaviour but is frequently seen in the wild.
- Allow for a continued-line expression argument to the 'if-then'
command.
related: #19172 (csh: Support negated if in matchit)
closes: #19190
Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: readdirex() might be slow (Mao-Yining)
Solution: Avoid double slash in path concatenation in
create_readdirex_item() (Yasuhiro Matsumoto)
On Cygwin and MSYS2, // has a special meaning: it is treated as a prefix
for accessing network computers.
For example, //wsl$/ is used to access WSL.
In the current Vim implementation, the directory path passed to
readdirex() and the file name found during traversal are concatenated
using "/".
When the directory path already ends with /, this results in paths like:
"/" + "/" + "$Recycle.Bin"
which produces a //-prefixed path. Such paths are interpreted as network
paths, so Vim ends up trying to retrieve the file size of a network
computer named $Recycle.Bin, which is not intended.
From a correctness perspective on Windows, file size retrieval should be
skipped for paths of the following forms:
//host
//host/share
However, as a first step, we should avoid generating // paths caused by
redundant / concatenation in the first place.
This change addresses this by preventing unnecessary / insertion when
constructing paths.
fixes: #19188
closes: #19241
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Muraoka Taro [Wed, 21 Jan 2026 19:41:58 +0000 (19:41 +0000)]
check.vim: Use silent command modifier
Problem: When checking a .po file (make -C src/po check), errors are not
displayed.
Solution: Adding "silent" to some normal commands in check.vim
suppresses unnecessary output (Muraoka Taro)
This is because the output of check.vim is redirected to /dev/null.
However, if you stop the redirection, check.vim generates a lot of
output and becomes very slow.
When these commands are run in ex mode, they output the contents of the
line the cursor is pointing to. This caused a lot of output.
closes: #19227
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>