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>
Muraoka Taro [Sat, 10 Jan 2026 18:07:09 +0000 (18:07 +0000)]
patch 9.1.2076: tests: MinGW test fails midway and stops
Problem: tests: When running the MinGW test, an error occurs after
generating opt_test.vim.
Solution: Rewrite the error detection in cmd.exe syntax (Muraoka Taro).
The recipe section of src/testdir/Make_ming.mak must be written in
cmd.exe syntax. This is because "SHELL = cmd.exe" is specified at the
beginning. However, the error detection in the opt_test.vim recipe is
written in UNXI syntax, which caused the error.
closes: #19146
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(sieve): preserve existing line endings in ftplugin
Only set fileformat=dos for new files; preserve existing line endings
when editing. This satisfies RFC 5228 for new files while avoiding
issues with version control and existing workflows.
The previous change (3cb4148) unconditionally set fileformat=dos, which
converts existing files with LF line endings to CRLF on save. This
causes issues with version control (entire file appears changed) and
breaks workflows where sieve files are stored with unix line endings.
Dovecot Pigeonhole (the main sieve implementation) has explicitly
accepted LF line endings since 2008 (commit 97b967b5):
/* Loose LF is allowed (non-standard) and converted to CRLF */
This behavior has remained unchanged for almost 18 years.
closes: #19144
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: André-Patrick Bubel <code@apb.name> Signed-off-by: Christian Brabandt <cb@256bit.org>
Foxe Chen [Fri, 9 Jan 2026 17:30:50 +0000 (17:30 +0000)]
patch 9.1.2072: Socket server has a few minor issues
Problem: Socket server has some small issues
Solution: Fix issues (see below)
- don't poll current vim instance when using serverlist()
- list the current vim instance in serverlist() (to match X11
behaviour)
- don't make X11 feature disable socketserver feature
- refactor CheckSocketServer logic and update tests with remote server
dependency
closes: #19118
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(syntax-tests): Adapt "runtime/syntax/testdir/vimcmd" for "src/testdir/util/shared.vim"
Problem: When "util/shared.vim" is sourced and GetVimCommand is called on
behalf of the syntax test runner, the "vimcmd" file will be searched
in the current working directory, i.e. "src/testdir", whereas the
desired file is in "runtime/syntax/testdir".
Solution: Temporarily copy "vimcmd" between test directories.
closes: #19127
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Fri, 9 Jan 2026 16:52:10 +0000 (16:52 +0000)]
patch 9.1.2069: Search wrap indicator not shown w/out 'shm-S'
Problem: when shortmess doesn't have 'S', backward search wrap doesn't
show the "W" before count. forward search works fine but
backward fails because the position check logic is backwards -
it checks if cursor < pos instead of using the existing
wrapped flag.
Solution: Use sia->sa_wrapped flag that searchit() already sets
correctly (glepnir).
fixes: #5280
closes: #19138
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Sean Dewar [Thu, 8 Jan 2026 21:27:55 +0000 (21:27 +0000)]
patch 9.1.2068: :bd/bw may try to switch to a closing buffer
Problem: :bdelete/bunload/bwipeout may attempt to switch to a closing
buffer, which fails. (after 9.1.2058)
Solution: don't consider switching to closing buffers (Sean Dewar)
closes: #19107
Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Muraoka Taro [Thu, 8 Jan 2026 20:12:58 +0000 (20:12 +0000)]
patch 9.1.2065: GvimExt cannot be linked statically using MinGW
Problem: When building GvimExt with MinGW, some DLLs are still linked
even if STATIC_STDCPLUS=yes is set.
Solution: Following the Vim core, make some libraries explicitly
statically linked. The order of libraries is important, and
gcc_eh must be placed before winpthread (Muraoka Taro)
closes: #19131
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Cezar Dimoiu [Thu, 8 Jan 2026 20:05:07 +0000 (20:05 +0000)]
runtime(yaml): update YAML indentation for mapping keys inside list items
When a list item contains a mapping key (e.g., '- element1:'), the
content under that key was incorrectly indented. The indent function
was not accounting for the '- ' prefix when calculating indentation
for nested content.
Example that now works correctly:
list:
- element1:
foo: bar # Now correctly at indent 6, not 4
The fix adds special handling in two places:
1. When previous line ends with ':' and starts with '- '
2. When looking up previous mapping key that is a list item
Fixes indentation to account for the 2-character '- ' prefix.
fixes: #18943
closes: #19133
Signed-off-by: Cezar Dimoiu <cezar.dimoiu@keysight.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
gitattributes: mark test21.ok binary, drop test42.in
This change does 2 things:
1) Mark src/testdir/test21.ok as binary by git.
After 0ed8ba3079ea5f38, test21.ok was treated by Git as a text file
using LF line endings. However, the test explicitly checks handling of
files with mixed line endings, so it must retain its literal LF and CR
endings and must not be modified by Git. Therefore, mark it explicitly
as binary.
2) Remove src/testdir/test42.in
This test was converted to the new-style test in v8.2.1316 and was
therefore deleted. There is no need to keep gitattributes rules for a
non-existing file.
Phạm Bình An [Thu, 8 Jan 2026 19:35:38 +0000 (19:35 +0000)]
runtime(doc): add termdebug tag, remove term "floating window"
Problem:
- When I type `:h termdebug`, I will expect to see the introduction of
the termdebug plugin. But instead, it shows me document of
`termdebug_wide`, and I have to scroll up quite much to find the
introduction.
- `:h popup` says `floating-window`? Why? As I have tried both features
(of Vim and Neovim), I think they are _very different_ things, even
more different than job features in Vim and Neovim.
Solution:
- In `:h terminal.txt`, add tag `*termdebug*` to the introduction of
termdebug plugin.
- In `:h popup.txt`, "floating window" -> "popup window".
closes: #19135
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Sean Dewar [Tue, 6 Jan 2026 11:58:44 +0000 (11:58 +0000)]
patch 9.1.2058: b_locked_split is not checked for :sbuffer
Problem: b_locked_split is not checked for :sbuffer, which allows
autocommands to leave windows open to freed buffers.
Solution: In do_buffer_ext, check just before possibly splitting, after
handling 'switchbuf'. Leave win_split to handle the check for
curbuf. (needed even if curbuf is not the target, as setting
the buffer after splitting may fail) (Sean Dewar)
closes: #19096
Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Tue, 6 Jan 2026 11:22:42 +0000 (11:22 +0000)]
patch 9.1.2056: tests: inconsistent indent and line breaking in Test_maparg()
Problem: tests: inconsistent indent and line breaking in Test_maparg().
Solution: Consistently use spaces-only indent. Reorder fields to group
similar ones together and break lines at consistent positions.
Remove a mapping when it is no longer used (zeertzjq).
closes: #19099
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Tue, 6 Jan 2026 11:11:16 +0000 (11:11 +0000)]
patch 9.1.2055: Division by zero in :file after failing to wipe buffer
Problem: Division by zero in :file after failing to wipe buffer
(after 8.2.4631).
Solution: Still call buf_clear_file() when failing to wipe buffer
(zeertzjq).
closes: #19088
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Muraoka Taro [Tue, 6 Jan 2026 10:30:09 +0000 (10:30 +0000)]
Always force LF line endings in old test .ok files
Problem: When running tests on a source tree checked out with git for
Windows, the old tests fail.
The Git for Windows installer installs git with core.autocrlf=true by
default. If you check out, build, and run tests using such a git, the
old test .ok files will likely fail because they use CRLF line endings.
Tests on Windows assume that .ok files use LF line endings, and
appropriately convert the line endings of related files. This
assumption breaks down when .ok files use CRLF.
Solution: Force LF line endings for old test .ok files in the
.gitattributes file. Related to that, we've stopped explicitly
specifying line endings when checking out in CI, since this is no longer
necessary.
While at it, also fix a typo in the comment of the gitattributes file.
closes: #19086
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>