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>
David Friant [Sat, 16 Aug 2025 16:30:55 +0000 (18:30 +0200)]
patch 9.1.1640: Unicode has deprecated some code-points
Problem: Unicode has deprecated some code-points
Solution: Update the digraph tables to align with the Unicode v16
release (David Friant)
This commit updates the digraphs Left-Pointing Angle Bracket '</'
and Right-Pointing Angle Bracket '/>' to account for the fact that
the old Unicode codepoints for them (2329 and 232A, respectively)
have been deprecated. As per the Miscellaneous Technical code chart
(https://www.unicode.org/charts/PDF/U2300.pdf), the old digraphs
have been reassigned to the CJK Left Angle Bracket and Right Angle
Bracket (3008 and 3009) with their declaration moved to the
appropriate block.
This commit also introduces the new digraphs '<[' and ']>' to
represent the Mathematical Left Angle Bracket and Mathematical
Right Angle Bracket (27E8 and 27E9) to replace the deprecated code
points in the Technical block.
Tests have been added and, I believe, the documentation has been
updated accordingly.
closes: #17990
Signed-off-by: David Friant <friant@HPEnvyx360.friant.dev> Signed-off-by: Christian Brabandt <cb@256bit.org>
Girish Palya [Sat, 16 Aug 2025 16:13:46 +0000 (18:13 +0200)]
patch 9.1.1639: completion: popup may be misplaced
Problem: During commandline completiom, popup window placement can be
incorrect when 'noselect' is present in 'wildmode'
(Shane-XB-Qian)
Solution: Disable "showtail" feature when 'noselect' is present.
fixes: #17969
closes: #18001
Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Girish Palya [Sat, 16 Aug 2025 16:04:04 +0000 (18:04 +0200)]
patch 9.1.1638: completion: not possible to delay the autcompletion
Problem: completion: not possible to delay the autcompletion
Solution: add the 'autocompletedelay' option value (Girish Palya).
This patch introduces a new global option 'autocompletedelay'/'acl' that
specifies the delay, in milliseconds, before the autocomplete menu
appears after typing.
When set to a non-zero value, Vim waits for the specified time before
showing the completion popup, allowing users to reduce distraction from
rapid suggestion pop-ups or to fine-tune the responsiveness of
completion.
The default value is 0, which preserves the current immediate-popup
behavior.
closes: #17960
Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Foxe Chen [Thu, 14 Aug 2025 20:08:17 +0000 (22:08 +0200)]
patch 9.1.1634: Clipboard code can be improved
Problem: Clipboard code can be improved
Solution: Slightly refactor code (Foxe Chen).
This commit does the following:
- Use garray_T when receiving data instead of manually reallocing
- formatting fixes
- skip Wayland test that requires clientserver if x11 not compiled
- Make some functions static
closes: #17999
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Thu, 14 Aug 2025 18:34:08 +0000 (20:34 +0200)]
patch 9.1.1630: tests: fuzzy bufname completion test doesn't match successfully
Problem: tests: fuzzy buffer name completion test doesn't match
successfully (after 9.1.1627).
Solution: Update pattern to account for the change in case sensitivity.
Also mark Test_search_stat_option() as flaky as it can still
sometimes fail (zeertzjq).
closes: #17992
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1629: Vim9: Not able to use more than 10 type arguments in a generic function
Problem: Vim9: Not able to use more than 10 type arguments in a generic
function
Solution: Initialize the types after reading all the type arg variable
names (Yegappan Lakshmanan)
closes: #17981
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Jon Parise [Wed, 13 Aug 2025 20:34:51 +0000 (22:34 +0200)]
runtime(python): highlight "self" and "cls" in syntax script
These are special names by convention, and giving them distinct
highlighting is a nice visual clue (using Identifier by default).
This group is named "pythonClassVar" to match the name used by
python-syntax. Some third-party color schemes are aware of this
name and customized their colors accordingly.
closes: #17968
Signed-off-by: Jon Parise <jon@indelible.org> Signed-off-by: Zvezdan Petkovic <zpetkovic@acm.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Wed, 13 Aug 2025 20:02:30 +0000 (22:02 +0200)]
patch 9.1.1628: fuzzy.c has a few issues
Problem: fuzzy.c has a few issues
Solution: Use Vims memory management, update style
(glepnir)
Problem:
- Missing cleanup of lmatchpos lists causing memory leaks
- Missing error handling for list operations
- Use of malloc() instead of Vim's alloc() functions
- Inconsistent C-style comments
- Missing null pointer checks for memory allocation
- Incorrect use of vim_free() for list objects
Solution:
- Add proper cleanup of lmatchpos in done section using list_free()
- Set lmatchpos to NULL after successful transfer to avoid confusion
- Add error handling for list_append_tv() failures
- Replace malloc() with alloc() and add null pointer checks
- Convert C-style comments to C++ style for consistency
- Fix vim_free() calls to use list_free() for list objects
closes: #17984
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Girish Palya [Tue, 12 Aug 2025 20:22:52 +0000 (22:22 +0200)]
patch 9.1.1627: fuzzy matching can be improved
Problem: fuzzy-matching can be improved
Solution: Implement a better fuzzy matching algorithm
(Girish Palya)
Replace fuzzy matching algorithm with improved fzy-based implementation
The
[current](https://www.forrestthewoods.com/blog/reverse_engineering_sublime_texts_fuzzy_match/)
fuzzy matching algorithm has several accuracy issues:
* It struggles with CamelCase
* It fails to prioritize matches at the beginning of strings, often
ranking middle matches higher.
After evaluating alternatives (see my comments
[here](https://github.com/vim/vim/issues/17531#issuecomment-3112046897)
and
[here](https://github.com/vim/vim/issues/17531#issuecomment-3121593900)),
I chose to adopt the [fzy](https://github.com/jhawthorn/fzy) algorithm,
which:
* Resolves the aforementioned issues.
* Performs better.
Implementation details
This version is based on the original fzy
[algorithm](https://github.com/jhawthorn/fzy/blob/master/src/match.c),
with one key enhancement: **multibyte character support**.
* The original implementation supports only ASCII.
* This patch replaces ascii lookup tables with function calls, making it
compatible with multibyte character sets.
* Core logic (`match_row()` and `match_positions()`) remains faithful to
the original, but now operates on codepoints rather than single-byte
characters.
Performance
Tested against a dataset of **90,000 Linux kernel filenames**. Results
(in milliseconds) show a **\~2x performance improvement** over the
current fuzzy matching algorithm.
```
Search String Current Algo FZY Algo
-------------------------------------------------
init 131.759 66.916
main 83.688 40.861
sig 98.348 39.699
index 109.222 30.738
ab 72.222 44.357
cd 83.036 54.739
a 58.94 62.242
b 43.612 43.442
c 64.39 67.442
k 40.585 36.371
z 34.708 22.781
w 38.033 30.109
cpa 82.596 38.116
arz 84.251 23.964
zzzz 35.823 22.75
dimag 110.686 29.646
xa 43.188 29.199
nha 73.953 31.001
nedax 94.775 29.568
dbue 79.846 25.902
fp 46.826 31.641
tr 90.951 55.883
kw 38.875 23.194
rp 101.575 55.775
kkkkkkkkkkkkkkkkkkkkkkkkkkkkk 48.519 30.921
```
```vim
vim9script
var haystack = readfile('/Users/gp/linux.files')
var needles = ['init', 'main', 'sig', 'index', 'ab', 'cd', 'a', 'b',
'c', 'k',
'z', 'w', 'cpa', 'arz', 'zzzz', 'dimag', 'xa', 'nha', 'nedax',
'dbue',
'fp', 'tr', 'kw', 'rp', 'kkkkkkkkkkkkkkkkkkkkkkkkkkkkk']
for needle in needles
var start = reltime()
var tmp = matchfuzzy(haystack, needle)
echom $'{needle}' (start->reltime()->reltimefloat() * 1000)
endfor
```
Additional changes
* Removed the "camelcase" option from both matchfuzzy() and
matchfuzzypos(), as it's now obsolete with the improved algorithm.
Anttoni Erkkilä [Tue, 12 Aug 2025 19:59:06 +0000 (21:59 +0200)]
patch 9.1.1626: cindent: does not handle compound literals
Problem: C-indent does not handle compound literals
(@44100hertz, @Jorenar)
Solution: Detect and handle compound literal and structure
initialization (Anttoni Erkkilä)
match '=' or "return" optionally followed by &, (typecast), {
Fixes also initialization which begins with multiple opening braces.
fixes: #2090
fixes: #12491
closes: #17865
Signed-off-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Girish Palya [Tue, 12 Aug 2025 19:38:56 +0000 (21:38 +0200)]
patch 9.1.1625: Autocompletion slow with include- and tag-completion
Problem: Autocompletion slow with include- and tag-completion
Solution: Refactor ins_compl_interrupted() to also check for timeout,
further refactor code to skip outputting message when
performing autocompletion (Girish Palya).
Running `vim *` in `vim/src` was slower than expected when
'autocomplete' was enabled. Include-file and tag-file completion
sources were not subject to the timeout check, causing unnecessary
delays.
So apply the timeout check to these sources as well, improving
autocompletion responsiveness, refactor find_pattern_in_path() to take
an additional "silent" argument, to suppress any messages.
closes: #17966
Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Shane-XB-Qian [Tue, 12 Aug 2025 19:28:28 +0000 (21:28 +0200)]
runetime(vim): gf maybe hang and fail
* searching'**' maybe terrible slow
* searching '**/plugin/' maybe fail
* the pattern for the :packadd/:import/:colorscheme
did not consistently check for a colon, so always use
'\%(:\s*\)\=' before the actual ex command
While at it rename the generic name vim.vim to vimgoto.vim as this more
clearly states what this script is for.
Signed-off-by: Shane-XB-Qian <shane.qian@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Damien Lejay [Tue, 12 Aug 2025 18:46:50 +0000 (20:46 +0200)]
patch 9.1.1624: Cscope not enabled on MacOS
Problem: Cscope not enabled on MacOS
Solution: Remove #ifdef test for MacOS and always enable FEAT_CSCOPE on
Unix (Damien Lejay).
Remove the !MACOS_X guard from FEAT_CSCOPE in feature.h. macOS has been a
certified UNIX since 10.5 and supports cscope without issues. This guard
originated in the pre-OS X era when Classic MacOS lacked the required
POSIX APIs. MacVim already ships with +cscope successfully.
closes: #17976
Signed-off-by: Damien Lejay <damien@lejay.be> Signed-off-by: Christian Brabandt <cb@256bit.org>
Jon Parise [Mon, 11 Aug 2025 18:33:33 +0000 (20:33 +0200)]
runtime(python): Also sync syntax at 'async def'
A file containing only async functions (`async def func()`) wouldn't
previously match the pythonSync pattern.
Also, this pattern only matches at the beginning of the line, so it
won't ever match method definitions (which are indented within class
scopes). Update the comment accordingly.
closes: #17963
Signed-off-by: Jon Parise <jon@indelible.org> Signed-off-by: Zvezdan Petkovic <zpetkovic@acm.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
Jon Parise [Sun, 10 Aug 2025 08:32:41 +0000 (10:32 +0200)]
runtime(python): Highlight classes as structures
Class and function definitions previously shared a single highlight
group (pythonFunction). This change gives classes their own highlight
group (pythonClass) that's linked to Structure.
closes: #17856
Signed-off-by: Jon Parise <jon@indelible.org> Signed-off-by: Zvezdan Petkovic <zpetkovic@acm.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1623: Buffer menu does not handle unicode names correctly
Problem: Buffer menu does not handle unicode names correctly
(after v9.1.1622)
Solution: Fix the BMHash() function (Yee Cheng Chin)
The Buffers menu uses a BMHash() function to generate a sortable number
to be used for the menu index. It used a naive (and incorrect) way of
encoding multiple ASCII values into a single integer, but assumes each
character to be only in the ASCII 32-96 range. This means if we use
non-ASCII file names (e.g. Unicode values like CJK or emojis) we get
integer underflow and overflow, causing the menu index to wrap around.
Vim's GUI implementations internally use a signed 32-bit integer for the
`gui_mch_add_menu_item()` function and so we need to make sure the menu
index is in the (0, 2^31-1) range.
To do this, if the file name starts with a non-ASCII value, we just use
the first character's value and set the high bit so it sorts after the
other ASCII ones. Otherwise, we just take the first 5 characters, and
use 5 bit for each character to encode a 30-bit number that can be
sorted.
This means Unicode file names won't be sorted beyond the first
character. This is likely going to be fine as there are lots of ways to
query buffers.
related: #17403
closes: #17928
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>