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>
Neila [Tue, 6 Jan 2026 10:18:09 +0000 (10:18 +0000)]
runtime(cangjie): Update syntax script
This commit updates `syntax/cangjie.vim` to match the latest `std.core`
library:
New Features:
* Documentation: Added highlighting for documentation keywords (e.g., `@param`, `@return`).
* Standard Library: Added highlighting for `std.core` functions, interfaces, and classes.
* Exceptions: Added highlighting for standard exception types.
* FFI Support: Added highlighting for C interoperability types (e.g., `CPointer`).
Improvements:
* Configuration: Added a unified switch (`s:enabled('builtin')`) for standard library highlighting.
* Type System: Updated `Int` and `UInt` aliases.
* Interpolation: Enabled standard library highlighting inside string interpolation.
* Cleanup: Removed non-core types like `ArrayList` and `HashMap`.
closes: #19085
Signed-off-by: Neila <wu.junkai@qq.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2054: Can't unpack tuple from imported function
Problem: Can't unpack tuple from imported function
(Mao-Yining)
Solution: Support multi-variable assignment from a tuple returned by an
imported function (Yegappan Lakshmanan)
fixes: #19080
closes: #19083
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Muraoka Taro [Tue, 6 Jan 2026 10:04:59 +0000 (10:04 +0000)]
patch 9.1.2053: MS-Windows: May use wrong find command
Problem: If another find.exe derived from findutils is installed on
Windows, unintended behavior will occur. If MSYS2 is installed and
prioritized over the system path, then find.exe derived from
findutils will be launched during build, resulting in an
unintended warning message.
Solution: Specify the absolute path including SYSTEMROOT to launch
find.exe (Muraoka Taro)
closes: #19081
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
When compiling with all features except for linebreak, there were some
compiler errors. By slightly modifying some preprocessor conditions,
compiling without the linebreak feature should work as expected.
closes: #19068
Signed-off-by: Matthias Rader <matthias.rader@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Muraoka Taro [Mon, 5 Jan 2026 08:13:18 +0000 (08:13 +0000)]
patch 9.1.2051: tests: fix Test_cd_completion fails in Appveyor
Problem: Test_cd_completion test fails in Appveyor. In Appveyor, a path
containing spaces was selected as the test target. But the
comparison failed because spaces were not taken into account
(after v9.1.2050)
Solution: Escape spaces in paths for comparison (Muraoka Taro)
closes: #19087
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Muraoka Taro [Sat, 3 Jan 2026 23:44:35 +0000 (23:44 +0000)]
patch 9.1.2050: tests: Test_cd_completion may fail
Problem: tests: Test_cd_completion() may fail depending on the contents
of the root directory of the current drive on Windows.
readdir() may return a directory that cannot "cd" to, causing
this test to fail. An example of such a directory is
"System Volume Information" which only admin can "cd" to.
Solution: When determining the directory to use for testing, use the
directory that we actually "cd" to successfully.
In addition, directories with '$' in their names are also
excluded, as they are considered environment variables during
completion and do not work as expected.
Example: "$RECYCLE.BIN" (Muraoka Taro).
closes: #19078
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Muraoka Taro [Sat, 3 Jan 2026 17:06:03 +0000 (17:06 +0000)]
patch 9.1.2048: MS-Windows: backspace behavior wrong with ConPTY
Problem: Pressing backspace in ConPTY on Windows deletes an entire
word, not just a single character. This is the same as
pressing Alt + backspace in cmd.exe.
Solution: When using ConPTY on Windows, the `VTERM_KEY_BACKSPACE` key is
now sent when the Backspace key or Ctrl+H is detected.
(Muraoka Taro)
Historically, Windows has assigned the code 0x7F (DEL) to backspace, and
it seems necessary to follow that behavior when using ConPTY.
closes: #19065
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Muraoka Taro [Sat, 3 Jan 2026 11:06:30 +0000 (11:06 +0000)]
CI: Missing test of Vim with ConPTY on Windows
Problem: Current CI Windows testing does not test Vim using ConPTY.
Solution: Added a configuration to enable ConPTY to the Windows matrix.
This configuration suppresses the installation of winpty,
allowing testing with ConPTY.
Since the fixes made at the end of last year, all tests now pass when
using ConPTY, just like when using winpty. ConPTY itself is stable on
recent versions of Windows, so there are no longer any reasons not to
test it.
closes: #19066
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2045: Mac: Build failure with Mac OS X 10.6
Problem: Mac: Build failure with Mac OS X 10.6
(Sergey Fedorov, after: v9.1.1748)
Solution: Add ifdefs MAC_OS_X_VERSION_10_7 around the code that sets the
scheduler priority.
John Marriott [Fri, 2 Jan 2026 14:11:58 +0000 (14:11 +0000)]
patch 9.1.2044: Inefficient use of ga_concat()
Problem: Inefficient use of ga_concat()
Solution: Use ga_concat_len() when the length is already known to avoid
use of strlen() (John Marriott).
Additionally the following changes are done:
os_unix.c:
- in function `socket_server_list_sockets()` use a `string_T` for the
strings `buf` and `path` for use in `ga_concat_len()`
and drop un-needed variable `dir`.
quickfix.c:
- in function `qf_jump_print_msg()` use a `string_T` for the string
`IObuff` for use in `ga_concat_len()`.
- in function `qf_range_text()` use a `string_T` for the string `buf`
for use in `ga_concat_len()`.
register.c:
- simplify function `execreg_line_continuation()`.
terminal.c:
- in function `read_dump_file()` use a `string_T` for the
string `prev_char` for use in `ga_concat_len()`.
tuple.c:
- in function `tuple_join_inner()` use a `string_T` for the
string `s` for use in `ga_concat_len()`. Also, change local struct
`join_T` to use `string_T`.
vim9type.c:
- in functions `type_name_tuple()` and `type_name_func()`
use a `string_T` for the string `arg_type` for use in
`ga_concat_len()`.
closes: #19038
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2039: if_ruby: crash when using Ruby/dyn 4.0
Problem: if_ruby: crash when using Ruby/dyn 4.0
(after v9.1.2036)
Solution: Fix Ruby 4.0 dynamic builds correctly by inlining
rb_check_typeddata (Yee Cheng Chin)
Ruby 4.0 broke Vim compilation in dynamic builds. That's because the
function `rb_check_typeddata` is now used in an inline function defined
in Ruby headers, which causes it to link against the lib statically
rather than using the one we load in dynamically
(`dll_rb_check_typeddata`) as we only remap it later (after the Ruby
header include).
A previous fix (v9.1.2036) did a wrong fix by stubbing in the actual
inline function `rbimpl_check_typeddata` instead. This does not work
because the inline function is not part of the dynamic lib and therefore
it's not possible to load it in dynamically (the patch also did not
actually attempt to load in the stub). With that patch, Vim would
crash when this function is used as the function pointer is null.
Fix this properly by reverting the previous change, and simply stub
`rb_check_typeddata` using similar mechanisms the file had already set
up for similar situations.
fixes: #18884
related: #19051
closes: #19060
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Several email addresses that are known to be valid caused bounces
due to an issue with my email setup. The previous commits incorrectly
marked these addresses as invalid. So revert the whole thing again.
Muraoka Taro [Wed, 31 Dec 2025 09:42:02 +0000 (09:42 +0000)]
patch 9.1.2033: tests: Test_terminal_cwd flaky when using ConPTY
Problem: tests: Test_terminal_cwd in test_terminal.vim fails flaky
in the Windows ConPTY terminal.
Solution: In ConPTY, the timeout is extended to 1msec when reading a
channel associated with a job that is about to finish. This
allows Vim to read the last output of a process in a pseudo
console. Add comments to make the reasoning clear.
(Muraoka Taro)
Processes that terminate too quickly in the ConPTY terminal cause Vim to
miss their final output.
In my environment, the probability of the "cmd /D /c cd" used in
Test_terminal_cwd occurring is about 1/4. For a simple statically
linked Hello World, the probability of it occurring is about 3/4.
closes: #19036
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Thomas Petazzoni [Sun, 28 Dec 2025 14:26:52 +0000 (14:26 +0000)]
patch 9.1.2031: Makefile: cannot run make installinks twice
Problem: Makefile: cannot run make installinks twice
Solution: Change "ln -s" to "ln -sf" to force creation of the symlinks
(Thomas Petazzoni)
Running "make installlinks" twice towards the same destination
directory will fail, as symlink will already exist. This is not really
expected as "make install" is normally expected to work again and
again towards the same destination directory.
Fix this by using ln -sf.
closes: #19035
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2029: tests: the test_vim9_class.vim testfile is too long
Problem: tests: the test_vim9_class.vim testfile is too long
Solution: Split out the interface related test cases into a new
test file test_vim9_interface.vim (Yegappan Lakshmanan)
closes: #19032
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Scott McKendry [Sat, 27 Dec 2025 15:15:35 +0000 (15:15 +0000)]
patch 9.1.2027: filetype: bicep filetype used for 2 bicep file types
Problem: filetype: bicep filetype used for 2 bicep file types
Solution: Detect *.bicepparam files as bicep-param filetype, include
new bicep-params and bicep filetype plugin
(Scott McKendry)
The bicep language server handles parameter files differently than
regular bicep files. Treating them the same at the editor level leads to
false positive diagnostics in the editor.
To be precise, the process is launched, but immediately after it is
launched, the input handle to the console is closed with the EOF of the
input, and the console is terminated. When the console is terminated,
the associated process is also terminated.
In the Windows pseudo console, input and output handles are closed after
the process in the console has terminated. This is not explicitly
stated in Microsoft's documentation. However, looking at the code for
Windows Terminal, which is presented as a complete example of the pseudo
console, it is implemented exactly this way.
The handle that is not closed at EOF is closed when Vim detects the end
of the job, so there is no risk of them being forgotten and leaking.
`ch_anonymous_pipe`, which was used to determine whether a channel was
for conpty, was set to TRUE only when conpty was being used. The
definition also had the comment `// ConPTY` attached to it. This name
is not very appropriate, but I felt it would be rude to add a new field
to `channel_T` just for this purpose, so I reused it.
closes: #19025
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.2023: [security]: Use-after-free in alist_add() with nasty autocmd
Problem: A BufAdd autocommand may cause alist_add() to use freed
memory, this is caused by the w_locked variable unset too
early (henices)
Solution: in trigger_undo_ftplugin() only set w_locked to false, if it
was false when calling the function.
Wei Tang [Fri, 26 Dec 2025 15:54:46 +0000 (15:54 +0000)]
patch 9.1.2022: using C++ keyword class as member variable name
Problem: A recent commit introduced a member variable named `class` in
the `exarg` structure, which conflicts with the C++ keyword
`class`. This causes compilation issues on Windows when VIM
is compiled with OLE enabled, as "if_ole.cpp" cannot compile
due to the keyword conflict (after v9.1.2012).
Solution: Rename the member variable of `exarg` from `class` to `ea_class`.
(Wei Tang)
related: #18949
closes: #19016
Signed-off-by: Wei Tang <gauchyler@uestc.edu.cn> Signed-off-by: Christian Brabandt <cb@256bit.org>
tao [Fri, 26 Dec 2025 15:51:32 +0000 (15:51 +0000)]
runtime(netrw): Fix reading UNC paths on windows
Problem: When Vim is launched with a UNC directory, netrw treats it as a
relative path and compose it again.
Solution: This is due to `exists("g:netrw_cygwin")` always being true.
We can directly use `g:netrw_cygwin`.
closes: #19015
Signed-off-by: tao <2471314@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
McAuley Penney [Fri, 26 Dec 2025 15:10:01 +0000 (15:10 +0000)]
patch 9.1.2019: inconsistent cursor encoding past EOL with ve=all
Problem: When virtualedit is set to all, the cursor is supposed to be
permitted to reside anywhere, including on the virtual space
beyond the end of the buffer's text. Switching modes triggered
a routine that "fixed" a cursor that was past the end of the
line by shifting it back to the last actual character in the
line and compensating with a virtual column offset. While
visually identical, this re-encoding changed the underlying
byte index, causing position-reporting functions to return
inconsistent values after a mode change.
Solution: Skip this coordinate adjustment when virtual editing is fully
enabled. By treating the line terminator as a valid, stable
position, the cursor’s internal representation remains
unchanged when entering or exiting Visual mode, ensuring
consistent coordinate reporting. Add a regression test to
check this functionality.
(McAuley Penney)
fixes: #16276
closes: #19009
Signed-off-by: McAuley Penney <jacobmpenney@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Foxe Chen [Fri, 26 Dec 2025 14:59:01 +0000 (14:59 +0000)]
runtime(osc52): A few minor fixes
- If g:osc52_disable_paste is enabled, then return an empty list instead
of a list with a single empty string.
- use `echo` instead of `echom` when printing osc waiting message
closes: #19002
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(make): Makefile highlighting breaks with ')' in string
Problem: Makefile syntax highlighting incorrectly ends function calls
when encountering ')' inside double or single quoted strings,
causing incorrect highlighting for the remainder of the line.
Solution: Add makeDString and makeSString to the contains list for
makeIdent regions. This allows strings to be recognized inside
variable references and function calls.
fixes: #18687
closes: #18818
Signed-off-by: Beleswar Prasad Padhi <beleswarprasad@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Yiyang Wu [Tue, 23 Dec 2025 21:25:04 +0000 (21:25 +0000)]
runtime(make): Move target greedy match after $() to avoid region matching overflow
Partially revert 2a33b499a3d7f46dc307234847a6562cef6cf1d8, where all
syn match makeIdent are moved before syn region makeIdent to match $()
(reason: see https://github.com/vim/vim/pull/18403#issuecomment-3341161566)
However this results in https://github.com/vim/vim/issues/18890 ,
because lines like
`$(a) =`
will first start a region search beginning with `$(`
but then the whole target including `)` will be matched by
`syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1`
which leaves the region search for the never-found `)` and let the
region matching overflow.
Same for
`$(a) ::`
`$(a) +=`
The solution is to move those greedy target match back, so they take
priority and prevents region match from happening.
fixes: #18890
closes: #18938
Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
When a line is wrapped on word boundaries, getregionpos() may report a
different end column for a visual block than the cursor position used to
define the selection.
Update the blockwise calculation in getregionpos() to use the same
wrapping assumptions as visual block mode, so the reported region
matches the selection boundaries.
Add a regression test that forces wrapping and checks that the end
position stays consistent under "setlocal wrap" and "setlocal
linebreak".
closes: #19006
Signed-off-by: McAuley Penney <jacobmpenney@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Anttoni Erkkilä [Tue, 23 Dec 2025 20:42:57 +0000 (20:42 +0000)]
patch 9.1.2016: cindent wrong indentation after do-while loop
Problem: At "if(0) do if(0); while(0); else", else should be aligned
with outer if, but is aligned with inner if.
Solution: In function find_match, ignore "if" and "else" inside a
do-while loop, when looking for "if". (Anttoni Erkkilä)
closes: #19004
Signed-off-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Foxe Chen [Tue, 23 Dec 2025 20:29:08 +0000 (20:29 +0000)]
patch 9.1.2014: clipboard: clipboard register corrupted with clipboard provider
Problem: clipboard: clipboard register corrupted with clipboard
provider (Satoru Kitaguchi and mikoto2000 after v9.1.1972)
Solution: Only adjust clipboard register points to the unnamed register
(Foxe Chen)
fixes: #18983
fixes: #18988
closes: #19000
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Muraoka Taro [Tue, 23 Dec 2025 20:22:54 +0000 (20:22 +0000)]
patch 9.1.2013: tests: Test_terminal_shell_option fails with conpty
Problem: tests: When opening a conpty terminal, if process startup
fails, it will silently exit. As a result, the
Test_terminal_shell_option in test_terminal3.vim failed in
conpty.
In a winpty terminal, the winpty-provided error message
"CreateProcess failed" was displayed. The test is designed to
catch this error as an exception.
Solution: Make conpty fail with an error messages in the same way as winpty.
(Muraoka Taro)
In addition, since the GetWin32Error() function can obtain more detailed
error messages, the format has been changed to "CreateProcess failed:
{localized message from the OS}" for conpty.
Also, since the GetWin32Error() function returns errors in ACP (Active
Code Page) encoding, these have been converted to Vim's internal
encoding, enc. This will prevent messages from being garbled in
Japanese environments, etc. The output of this function was basically
used by the semsg() function in other places, so this change also fixes
potential similar garbled characters.
The test now errors out immediately in places where it is expected not
to be reached, and comments have been added about the expected content
of the winpty and conpty error messages.
closes: #18998
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>