patch 9.1.1708: tests: various tests can be improved
Problem: tests: various tests can be improved
Solution: Use string interpolation to concatenate strings in
test_winfixbuf, check for specific errors in assert_fails()
(Yegappan Lakshmanan)
closes: #18151
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Foxe Chen [Wed, 27 Aug 2025 21:53:41 +0000 (23:53 +0200)]
patch 9.1.1706: MS-Windows: Compile error when building with if_ruby
Problem: MS-Windows: Compile error when building with if_ruby
(Christian Robinson, after v9.1.1704)
Solution: Do not define gettimeofday() if ruby interface is compiled in
(Foxe Chen).
fixes: #18143
closes: #18144
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Damien Lejay [Wed, 27 Aug 2025 19:31:35 +0000 (21:31 +0200)]
patch 9.1.1705: time.h include is available on all platforms
Problem: time.h include is available on all platforms
Solution: Remove ifdef guards and simply include it in all source files,
get rid of double include in spellfile.c (Damien Lejay).
closes: #18075
Signed-off-by: Damien Lejay <damien@lejay.be> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1701: tests: failure on CI with GUI and ASAN in test_edit.res
Problem: tests: failure on CI with GUI and ASAN in test_edit.res
(Hirohito Higashi)
Solution: Disable the test for that specific situation in CI, close
swapfiles
patch 9.1.1700: Multiline ignorecase specific pattern does not match with 'ignorecase'
Problem: a pattern that involves a backref on a different line does not
match when 'ignorecase' is set (QiWei, after v9.1.0645)
Solution: Use MB_STRNICMP when ignorecase is set, fix tests to close
swapfiles
related: #14756
fixes: #17470
closes: #18104
Signed-off-by: author Signed-off-by: Christian Brabandt <cb@256bit.org>
Maxim Kim [Wed, 27 Aug 2025 16:09:14 +0000 (18:09 +0200)]
patch 9.1.1699: Fuzzy completion disabled for 'findfunc' and customlist
Problem: Fuzzy completion disabled for 'findfunc' and customlist
Solution: Remove those cases from cmdline_fuzzy_completion_supported()
because it is supported (Maxim Kim).
fixes: #18117
closes: #18122
Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Sean Dewar [Tue, 26 Aug 2025 19:45:07 +0000 (21:45 +0200)]
patch 9.1.1696: tabnr from getwininfo() for popup windows is always 0
Problem: getwininfo() has logic for getting the tabnr of a local popup
window, but due to only breaking from the inner loop, tp is
eventually set to NULL, so tabnr is always 0.
Solution: Break out of both loops, continue to use 0 for global popup
windows (Sean Dewar).
closes: #18111
Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1693: tests: test_filetype fails in shadow dir
Problem: tests: test_filetype fails in shadow dir
(after v9.1.9.1.1687)
Solution: Use a custom test that does not rely on configure.ac
being existing in the upper directory tree.
Damien Lejay [Tue, 26 Aug 2025 15:55:14 +0000 (17:55 +0200)]
patch 9.1.1691: over-allocation in ga_concat_strings()
Problem: over-allocation in ga_concat_strings()
Solution: Fix ga_concat_strings() and only allocate n-1 separator length
bytes (Damien Lejay).
ga_concat_strings() was adding the separator length for every item,
including the last one. Only (n - 1) separators are actually used.
This caused harmless but unnecessary overallocation.
closes: #18112
Signed-off-by: Damien Lejay <damien@lejay.be> Signed-off-by: Christian Brabandt <cb@256bit.org>
John Marriott [Tue, 26 Aug 2025 15:32:18 +0000 (17:32 +0200)]
patch 9.1.1688: potential buffer overrun in bufwrite.c
Problem: potential buffer overrun in bufwrite.c
Solution: Use a temporary variable (John Marriott)
In my Windows 11 Pro 64-bit build MAXPATHL is 1024 and IOSIZE is 1025.
In my Archlinux Linux 64-bit build MAXPATHL is 4096 and IOSIZE is 1025.
In funuction buf_write():
There is a check (line 713) that makes sure the length of fname is less
than MAXPATHL. There is a call to STRCPY() (line 1208) which copies the
string at fname into IObuff (which has size IOSIZE). For Unix builds
fname is set to sfname which may or may not be shorter. However, if
sfname is NULL sfname is set to fname.
Therefore, in builds where MAXPATHL > IOSIZE (eg in my linux build), it
is theoretically possible for the STRCPY() call to exceed the bounds of
IObuff.
This PR addresses this by copying fname into a local variable that has
the same maximum size as fname.
In addition:
Given that the filename is unconditionally overwritten in the for loop,
only copy the directory portion of fname. Move variable i closer to
where it is used.
closes: #18095
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
Damien Lejay [Tue, 26 Aug 2025 15:09:47 +0000 (17:09 +0200)]
patch 9.1.1687: filetype: autoconf filetype not always correct
Problem: filetype: autoconf filetype not always correct
Solution: Detect aclocal.m4 as config filetype, detect configure.ac as
config filetype, fall back to POSIX m4 (Damien Lejay).
closes: #18065
Signed-off-by: Damien Lejay <damien@lejay.be> Signed-off-by: Christian Brabandt <cb@256bit.org>
Jon Parise [Sun, 24 Aug 2025 10:31:08 +0000 (12:31 +0200)]
runtime(python): support 'type's soft keyword form
`type` became a soft keyword in Python 3.12. In that form, it is a
statement that declares a type alias:
# type_stmt ::= 'type' identifier [type_params] "=" expression
type Point = tuple[float, float]
To implement support for this, this change does three things:
1. adds a `pythonType` group (linked to `Type`)
2. matches `type` followed by an identifier as `pythonStatement`
3. continues to match `type` in other forms as `pythonBuiltin`
Problem: tests: Test_wildtrigger_update_screen() creates an unused
mapping (after 9.1.1621).
Solution: Remove the mapping. Also use blank lines more consistently in
test_cmdline.vim screendump tests (zeertzjq).
closes: #18096
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Sun, 24 Aug 2025 10:22:10 +0000 (12:22 +0200)]
patch 9.1.1681: tests: no test for actually moving cursor with 'acl'
Problem: tests: no test for actually moving cursor when menu is not
open with 'autocompletedelay'.
Solution: Use <Up> first in the test. Also remove two unnecessary <Esc>s
in completion timeout test (zeertzjq).
closes: #18097
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1680: MS-Windows: possible buffer-under run in if_cscope
Problem: MS-Windows: possible buffer-under run in if_cscope
cs_pathcomponents() (Murali Aniruddhan)
Solution: Fix the loop and do not decrement the pointer twice.
Jason Long [Sat, 23 Aug 2025 15:44:32 +0000 (17:44 +0200)]
runtime(netrw): fix :Explore command in terminal
There are really two issues solved here:
- The directory listing was not populating the new buffer when using
the :Explore command. This was because the directory to open is
determined by using expand("%:p") which includes '!/running/command' at
the end of the string in terminal buffers.
- The :Explore command should replace the buffer, not split it. This
because the Explore command will automatically split if the current
buffer has been modified. According to the docs, all terminal buffers
will have the modified flag set when a job is running.
Damien Lejay [Sat, 23 Aug 2025 15:37:12 +0000 (17:37 +0200)]
patch 9.1.1678: Amiga: cannot handle large undo files
Problem: Amiga: cannot handle large undo files
Solution: Remove the existing restriction as it was only valid for
classic Amiga (Damien Lejay).
It seems that this block was only relevant for classic AmigaOS (< 32K
alloc limit). And it seems to no longer apply: AmigaOS 4.0 switched to
a slab allocator memory system.
closes: #18072
Signed-off-by: Damien Lejay <damien@lejay.be> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Sat, 23 Aug 2025 10:10:23 +0000 (06:10 -0400)]
patch 9.1.1667: Another outdated comment in eval.c
Problem: Another outdated comment in eval.c (after 9.1.1665).
Solution: Remove that comment as well. Add a few more tests for mapnew()
that fail without patch 8.2.1672 (zeertzjq).
closes: #18089
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Foxe Chen [Sat, 23 Aug 2025 09:56:40 +0000 (05:56 -0400)]
patch 9.1.1666: no support for terminal primary device attributes
Problem: no support for terminal primary device attributes
Solution: Add support for detecting the DA1 response from the terminal,
add the v:termda1 variable and the 't_Ms' option for the
OSC 52 command format (Foxe Chen)
closes: #18033
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Damien Lejay [Fri, 22 Aug 2025 16:36:43 +0000 (12:36 -0400)]
patch 9.1.1664: configure: can use any autoconf
Problem: configure: can use any autocon
Solution: Use AC_PREREQ and require 2.71 (Damien Lejay)
technically, we require autoconf 2.72, but that is not available on
Ubuntu LTS 24.04. So let's go with 2.71 for now and add a comment about
it in configure.ac
closes: #18047
Signed-off-by: Damien Lejay <damien@lejay.be> Signed-off-by: Christian Brabandt <cb@256bit.org>
Maxim Kim [Wed, 20 Aug 2025 20:28:29 +0000 (22:28 +0200)]
runtime(colors): Update colorschemes
- all colorschemes were ported to colortemplate v3
- gui versions of habamax, lunaperche, wildcharm, retrobox colorschemes
have different Diff, Visual, Search and IncSearch colors compared to non-gui.
- habamax Search was changed to green instead of blue to better distinct
it with Visual (also bluish in gui)
Commit 48a75f3dfb906a2d333a7b1c3545e2eb359596db (Patch 9.1.0023)
introduces a call to __disableautocvt() which can only be found in a
non-native z/OS library. This requires installing the external zoslib
library in order to work, which is not present on all z/OS systems
So remove the call to __disableautocvt() and rely on library routines
that are available to all z/OS users
See https://ibmruntimes.github.io/zoslib/zos-io_8cc.html for more
details
closes: #18059
Signed-off-by: David Seal <dseal@rocketsoftware.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Hirohito Higashi [Wed, 20 Aug 2025 20:08:13 +0000 (22:08 +0200)]
patch 9.1.1662: Issues with proto files: missing or inconsistent prototypes.
Problem: Issues with proto files: missing or inconsistent prototypes.
Solution: Update ifdefs, move typedefs, fix prototype declaration
(Hirohito Higashi)
This change focuses on fixes and tweaks found while working on #18045 for
the proto/*.pro files.
The following fixes and tweaks have been made:
- Fixed a prototype declaration where the variable name differed from
the function definition.
- Removed a prototype declaration without a function body.
- Fixed a problem where a prototype declaration was not created for a
function definition enclosed in a #if directive because it lacked ||
defined(PROTO).
- Moved typedef struct soundcb_S soundcb_T; from proto/sound.pro to
vim.h.
- Other small tweaks.
glepnir [Wed, 20 Aug 2025 19:43:15 +0000 (21:43 +0200)]
patch 9.1.1660: popups without decoration are positioned wrong at bottom of screen
Problem: Popups without border/padding/title don't flip position when
cursor is near bottom of screen, while decorated popups do
flip correctly.
Solution: Use original height instead of truncated height for position
inversion check, except for info popups to preserve existing
behavior (glepnir).
fixes: #12546
closes: #18054
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1654: build failure when FEAT_DIFF is not defined
Problem: build failure when FEAT_DIFF is not defined
(John Marriott)
Solution: Remove FEAT_DIFF in proto.h; define dummy type for
diffline_T and diffline_change_T when FEAT_DIFF is not defined
glepnir [Mon, 18 Aug 2025 19:14:48 +0000 (21:14 +0200)]
patch 9.1.1650: popup: window may not properly resize
Problem: After scrolling a popup and then using popup_settext() with
fewer lines, the popup fails to resize properly because
firstline points beyond the new buffer content (lifepillar)
Solution: In popup_adjust_position(), validate that firstline doesn't
exceed buffer line count and reset to 0 (auto-position) if it
does (glepnir)
fixes: #14745
closes: #18031
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
WuJunkai2004 [Mon, 18 Aug 2025 18:53:34 +0000 (20:53 +0200)]
patch 9.1.1647: filetype: Cangjie files are not recognized
Problem: filetype: Cangjie files are not recognized
Solution: Detect *.cj files as cangjie filetype, include a syntax plugin
(WuJunkai2004)
This commit introduces a new syntax highlighting file for the Cangjie
programming language, includes 4 parts as required:
- The main syntax file: runtime/syntax/cangjie.vim
- The filetype detection rule in: runtime/filetype.vim
- The documentation update in: runtime/doc/syntax.txt
- Some menus
glepnir [Sun, 17 Aug 2025 19:40:45 +0000 (21:40 +0200)]
patch 9.1.1645: fuzzy.c can be further improved
Problem: fuzzy.c can be further improved
Solution: Fix memory leak and refactor it (glepnir).
Optimize performance and memory allocation:
- Fix memory leak in fuzzy_match_in_list.
- using single memory allocation in match_positions
- Improve has_match performance and add null pointer checks
closes: #18012
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Damien Lejay [Sun, 17 Aug 2025 19:25:07 +0000 (21:25 +0200)]
patch 9.1.1644: configure: doesn't separate CPPFLAGS and CFLAGS
Problem: configure: doesn't separate CPPFLAGS and CFLAGS
Solution: Split CPPFLAGS and CFLAGS for pkg-config
(Damien Lejay)
Previously, all flags returned by pkg-config --cflags were dumped into
CFLAGS, mixing include paths with compiler options. This commit uses
--cflags-only-I and --cflags-only-other to properly separate include
flags into CPPFLAGS and keep compiler flags in CFLAGS.
closes: #18019
Signed-off-by: Damien Lejay <damien@lejay.be> Signed-off-by: Christian Brabandt <cb@256bit.org>