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>
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>