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>
James McCoy [Wed, 21 Jan 2026 19:38:48 +0000 (19:38 +0000)]
runtime(debcontrol): improve Debian syntax files
Changes to debcontrol:
- Only use debcontrolEmail for Maintainer/Uploaders
- Add Build-Driver to debcontrolField
- Add Protected to debcontrolStrictField
- Remove Uploaders from the more generic region
- Add explicit support for highlighting build profiles
- Add explicit support for highlighting architecture specifications
- Fix URL for sections.822
Changes to debversions:
- Move plucky to unsupported
closes: #19228
Signed-off-by: James McCoy <jamessan@debian.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
CI: Reorder path in Windows CI runners and move Python3 before $PATH
Apparently, sometimes Vim tries to load python.dll from the Mercurial
directory. So let's move the $PYTHON3_DIR before $PATH, so that Vim can
pickup python3.dll from the right directory
Content:
* Refer to the formatter as "GNU troff". Strictly, "groff" refers to
several things.[1] Since the context is the editing of input to the
formatter, GNU's troff program is most relevant choice.
* Refer to groff as distributions' default "typesetting" rather than
"text processing" package. Many text processing tools exist, and some
distributions (Alpine Linux, NetBSD, OpenBSD) have replaced groff with
mandoc[2] as their man page formatter.
* Mention that Plan 9 still ships an AT&T-derived troff; they even
maintain it.[3]
* Correct explanation of traditional `yr` register (1). `\n(yr` is not
a request, but an escape sequence.[4]
* Correct explanation of traditional `yr` register (2). This register
has not interpolated a "2-digit year" since the year 2000; it now
interpolates a 3-digit one, because AT&T troff designed the `yr`
register with a Y2K bug in it.[5]
* Fix scrambled terminology. The phrase "macro request" confuses two
separate things: macros and requests.[6] Say instead "font, request,
register, macro, and string names"; these are the formatter object
types that people writing groff documents most often use.
* Refer to "groff's mm package" instead of "GNU mm". Strictly, this
package is in groff's "contrib" area, which implies that it's not
official GNU product. (To be fair, after shipping with groff for over
34 years,[7] I'm not sure how much distinction anyone perceives.)
* Motivate the newly added advice preferring macro package facilities
for paragraphing; this issue is distinct from aiding sentence boundary
detection, which until recently[8] was the only advice offered here.
Style:
* Condense introductory paragraphs.
* Refer to "language syntax" rather than "language primitives".
* Use slightly more idiomatic English.
While these revisions convey more information, they leave the line count
unchanged. I'll try to stop fooling with this material now.
Muraoka Taro [Tue, 20 Jan 2026 19:07:02 +0000 (19:07 +0000)]
patch 9.1.2099: different line endings in ja.sjis.po and ja.po
Problem: Depending on the worker's environment, the line endings in
ja.sjis.po may differ from those in the source ja.po.
Solution: By setting standard input and output to binary mode, the line
endings for input and output will match (Muraoka Taro)
This occurs when using MINGW gcc on Windows and git with autocrlf=false.
In this case, the line endings in ja.po are LF, but because sjiscorr
compiled with MINGW gcc uses text mode for standard input and output,
the line endings in the output ja.sjis.po will be CRLF.
This mismatch in line endings confuses git, causing large differences to
occur when updating.
In addition, the comment style has been changed to // to match the rest
of Vim's code.
closes: #19226
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(netrw): Do not create swapfiles in netrw buffers
Problem: When using netrw to navigate directories, vim immediately
creates, then deletes a swap file in the entered directory,
causing the lastModifiedTime of that directory to change.
Solution: Use the :noswapfile command modifier in s:NetrwEditFile()
zeertzjq [Mon, 19 Jan 2026 19:02:08 +0000 (19:02 +0000)]
patch 9.1.2098: Crash with 'wildmenu' when typing Ctrl-Y after Ctrl-A
Problem: Crash with 'wildmenu' when typing Ctrl-Y after Ctrl-A
(after 9.1.1714) (fizz-is-on-the-way).
Solution: Check if there are matches before applying one (zeertzjq).
closes: #19210
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Mon, 19 Jan 2026 18:59:08 +0000 (18:59 +0000)]
patch 9.1.2097: TabClosedPre may be triggered twice for the same tab page
Problem: TabClosedPre may be triggered twice for the same tab page when
closing another tab page in BufWinLeave (after 9.1.1211).
Solution: Store whether TabClosedPre was triggered in tabpage_T
(zeertzjq).
Also fix the inconsistency that :tabclose! triggers TabClosedPre after
a failed :tabclose, but :close! doesn't even if there is only one window
in the tab page.
closes: #19211
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Mon, 19 Jan 2026 18:15:51 +0000 (18:15 +0000)]
patch 9.1.2095: :wqall! doesn't quit when using :quit in BufWritePost
Problem: :wqall! doesn't quit when using :quit in BufWritePost
(after 8.0.1190).
Solution: Restore old value of "exiting" when calling not_exiting()
instead of always resetting it to FALSE (zeertzjq).
related: #2205
closes: #19212
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Muraoka Taro [Mon, 19 Jan 2026 18:05:37 +0000 (18:05 +0000)]
translation(jp): Update Japanese Translation for Vim 9.2 Release
I've updated the Japanese translation for the Vim 9.2 release. The
content contained in this PR was created collaboratively by multiple
peoples in the vim-jp/lang-ja project, and I, koron (Muraoka Taro), am
submitting it as the project representative.
The PR used for this work is https://github.com/vim-jp/lang-ja/pull/171.
(Please note that the communication in this PR is in Japanese)
closes: #19215
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Content:
* Offer more specific guidance regarding input line breaks and sentence
endings.
* Advise what to do when a line ends with sentence-ending punctuation
but doesn't end a sentence.
* Advise against use of blanks lines and leading spaces for formatting
when a macro package is in use.
* Advise how to achieve visual separation in the document without
affecting formatting.
* Point out how the newline/end-of-sentence rules aid diffing.
* Distinguish the separate processes of inter-sentence space
supplementation and filling.
* Use conventional (but accessible) terms from typography instead of
more casual, approximate ones.
* Clarify what sort of extension the ms package's `XP` macro is.
Style:
* Fix comma splice with a semicolon.
* Use slightly more standard/idiomatic English.
zeertzjq [Sun, 18 Jan 2026 20:51:56 +0000 (20:51 +0000)]
patch 9.1.2093: heap-use-after-free when wiping buffer in TabClosedPre
Problem: heap-use-after-free when wiping buffer in TabClosedPre.
Solution: Check window_layout_locked() when closing window(s) in another
tabpage (zeertzjq).
closes: #19196
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2091: Ruby integration does not work correctly
Problem: Ruby headers define HAVE_FSYNC, which leaks into Vim sources
on Windows and changes conditional compilation of buf_T. This
causes struct layout mismatches in if_ruby.c and results in a
different offset for the b_p_bl property, making Vim::Buffer
access fail (after v9.1.2024)
Solution: Undefine HAVE_FSYNC after including the Ruby headers.
zeertzjq [Sat, 17 Jan 2026 10:13:57 +0000 (10:13 +0000)]
patch 9.1.2090: Last buffer not freed with EXITFREE
Problem: Last buffer not freed with EXITFREE (after 9.1.2087).
Solution: Free the last buffer when inside free_all_mem()
(zeertzjq).
This isn't really a memory leak, as the last buffer's memory is still
reachable via pointers like firstbuf and lastbuf. But it's possible that
this may cause false ASAN warnings in the future, which is what EXITFREE
is supposed to prevent.
closes: #19194
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(syntax-tests): tests: sh_10 fails on MacOS runners
Problem: tests: sh_10 fails on MacOS runners (after 16c22790627f063)
because dash does not exist on MacOS
Solution: Force the test to use bash shebang line
Foxe Chen [Fri, 16 Jan 2026 18:36:31 +0000 (18:36 +0000)]
patch 9.1.2089: Wayland: Clipboard not working with external programs
Problem: Wayland: Clipboard not working with external programs on
Wayland (devsnek)
Solution: Simplify the Wayland offer logic and drop offering the special
mime type (Foxe Chen)
fixes: #19050
closes: #19184
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Fri, 16 Jan 2026 18:31:33 +0000 (18:31 +0000)]
patch 9.1.2088: Redundant NULL checks in find_pattern_in_path()
Problem: Redundant NULL checks in find_pattern_in_path().
Solution: Remove the NULL checks. Also fix typos in test_diffmode.vim
(zeertzjq).
After assigning to inc_opt on line 3461, it's dereferenced immediately,
and not assigned another value afterwards, so checking for NULL after
line 3462 is redundant.
closes: #19185
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Fri, 16 Jan 2026 18:25:29 +0000 (18:25 +0000)]
patch 9.1.2087: Crash when using :tabonly in BufUnload
Problem: Crash when using :tabonly in BufUnload.
Solution: Set curbuf when setting curwin->w_buffer. Don't wipe out a
buffer if there are no other buffers. Don't decrement
b_nwindows if it was 0 before buf_freeall() (zeertzjq).
Sean Dewar [Thu, 15 Jan 2026 20:14:08 +0000 (20:14 +0000)]
patch 9.1.2086: Memory leak when skipping invalid literal dict
Problem: memory leak when not evaluating (just parsing) invalid literal
dict.
Solution: Always clear the key's typval (Sean Dewar)
Though "check_typval_is_value(&tv) == FAIL && !evaluate" is maybe never
true, also always clear tvs if check_typval_is_value fails; at worst
this would be a no-op as their initial types are VAR_UNKNOWN.
closes: #19178
Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The indentation of Ansible Playbooks gets messed up after
gg=G (after 9179ddc0608813e)
Solution: Remove one shiftwidth() that seems to be misplaced.
closes: #19180
Signed-off-by: Bjoern Foersterling <bjoern.foersterling@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2085: Use-after-free in winframe_remove()
Problem: Use-after-free in winframe_remove() (henices)
Solution: Set window_layout_locked() inside winframe_remove()
and check that writing diff files is disallowed when the
window layout is locked.
It can happen with a custom diff expression when removing a window:
1. Buffer was removed, so win_frame_remove() is called to remove the
window.
2. win_frame_remove() → frame_new_height() → scroll_to_fraction()
→ diff_check_fill() (checks for filler lines)
3. diff_check_fill() ends up causing a diff_try_update, and because we
are not using internal diff, it has to first write the file to a
buffer using buf_write()
4. buf_write() is called for a buffer that is not contained within a
window, so it first calls aucmd_prepbuf() to create a new temporary
window before writing the buffer and then later calls
aucmd_restbuf(), which restores the previous window layout, calling
winframe_remove() again, which will free the window/frame structure,
eventually freeing stuff that will still be accessed at step 2.
Muraoka Taro [Sun, 11 Jan 2026 19:44:06 +0000 (19:44 +0000)]
patch 9.1.2081: MS-Windows: unnecessary "#ifdef FEAT_GUI" in os_win32.c
Problem: MS-Windows: "#ifdef FEAT_GUI" exists within "ifdef
FEAT_GUI_MSWIN", which is confusing when reading the code.
FEAT_GUI is always defined if FEAT_GUI_MSWIN is defined (see
vim.h). Therefore, this check and the else block are
unnecessary.
Solution: Removed unnecessary "#ifdef FEAT_GUI" (Muraoka Taro).
closes: #19164
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Lifepillar [Sun, 11 Jan 2026 18:36:52 +0000 (18:36 +0000)]
runtime: Update files for ConTeXt, METAFONT, and MetaPost.
This update is meant to be included in the upcoming 9.2 release.
**New**
- Support ConTeXt's convention to optionally specify an output directory
in a comment line at the beginning of a source file.
- If a log file is not found, Vim does not create a new buffer.
- Removed `syntax/shared` files for the following reasons:
- they are not necessary for the plugin to work (they only improve
over existing syntax highlighting);
- they are relative large;
- they can be automatically (re)generated by users at any time using
ConTeXt (explained in the doc);
- since ConTeXt is updated frequently, they quickly become obsolete.
**Minor**
- Prefer `var` to `const` inside functions.
- Prefer `$`-interpolation to `printf()`.
- All revision dates set to the same date for consistency.
- Updated the error format.
- Various tweaks to the documentation, but nothing disruptive or new.
closes: #19148
Signed-off-by: Lifepillar <lifepillar@lifepillar.me> Signed-off-by: Christian Brabandt <cb@256bit.org>
Phạm Bình An [Sun, 11 Jan 2026 18:19:52 +0000 (18:19 +0000)]
runtime(doc): clarify vim.eval behavior with Vim special variables
Problem: The behavior of vim.eval() with Vim special variables is not
clearly documented. It is (partly) the reason why Nvim
Python's vim.eval gives different output when evaluating
v:true and v:false
Solution: Document it (Phạm Bình An)
closes: #19157
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2077: Vim9: type issue when appending item to a list
Problem: Vim9: type issue when appending item to a list
(Peter Kenny)
Solution: When adding a new item at the end of a list in vim9script, use
the proper item type (Yegappan Lakshmanan)
fixes: #19045
closes: #19076
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>