]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
5 days agoCI: Manage multibyte characters in syntax tests master
Aliaksei Budavei [Fri, 25 Jul 2025 18:08:52 +0000 (20:08 +0200)] 
CI: Manage multibyte characters in syntax tests

As reported in #16559, bytes of a multibyte character may
be written as separate U+FFFD characters in a ":terminal"
window on a busy machine.  The testing facilities currently
offer an optional filtering step to be carried out between
reading and comparing the contents of two screendump files
for each such file.  This filtering has been resorted to
(#14767 and #16560) in an attempt to unconditionally replace
known non-Latin-1 characters with an arbitrary substitute
ASCII character and avoid this rendering mishap leading to
syntax tests failures.  However, it has been overlooked at
the time that metadata description (in shorthand) to follow
spurious U+FFFD characters may be *distinct* and make the
remainder of such a line, ASCII characters and whatnot, also
unequal between compared screendump files.

While it is straightforward to adapt current filter files to
ignore the line characters after the leftmost U+FFFD,

> It is challenging and error-prone to keep up to date filter
> files because moving around examples in source files will
> likely make redundant some previously required filter files
> and, at the same time, it may require creating new filter
> files for the same source file; substituting one multibyte
> character for another multibyte character will also demand
> a coordinated change for filter files.

Besides, unconditionally dropping arbitrary parts of a line
is rather too blunt an instrument.  An alternative approach
is to not use the supported filtering for this purpose; let
a syntax test pass or fail initially; then *if* the same
failure is imminent, drop the leftmost U+FFFD and the rest
of the previously seen line (repeating it for all previously
seen unequal lines) before another round of file contents
comparing.  The obvious disadvantage with this filtering,
unconditional and otherwise, is that if there are consistent
failures for _other reasons_ and the unequal parts happen to
be after U+FFFDs, then spurious test passing can happen when
stars align for _a particular test runner_.

Hence syntax test authors should strive to write as little
significant text after multibyte characters as syntactically
permissible, write multibyte characters closer to EOL in
general, and make sure that their checked-in and published
"*.dump" files do not have any U+FFFDs.

It is also practical to refrain from attempting screendump
generation if U+FFFDs can already be discovered, and instead
try re-running from scratch the syntax test in hand, while
accepting other recently generated screendumps without going
through with new rounds of verification.

Reference:
https://github.com/vim/vim/pull/16470#issuecomment-2599848525

closes: #17704

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agoCI: Remove the file filters for syntax tests
Aliaksei Budavei [Fri, 25 Jul 2025 18:07:47 +0000 (20:07 +0200)] 
CI: Remove the file filters for syntax tests

These file filters are not sufficient to work around #16559
and are to be superseded by a more promising alternative.

related: #17704

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agoCI(screendump): Support iterative filtering for screendump comparison
Aliaksei Budavei [Fri, 25 Jul 2025 18:06:38 +0000 (20:06 +0200)] 
CI(screendump): Support iterative filtering for screendump comparison

Before two screendumps are compared for equality by calling
"VerifyScreenDump()", parts of their contents can be omitted
from comparison by executing arbitrary Vim commands written
in a filter file that shares its basename with screendumps.
Sometimes, such filtering can only be too general, as more
context is required in order to decide what parts to touch.
Two new arbitrary functions are therefore hooked in the body
of "VerifyScreenDump()" for the purpose of probing into the
current context and applying iterative filtering as needed.
A paired-up public implementation of each function is also
provided to expedite a workaround for #16559:
------------------------------------------------------------
source util/screendump.vim
let opts = {
    \ 'FileComparisonPreAction':
\ function('g:ScreenDumpDiscardFFFDChars'),
    \ 'NonEqualLineComparisonPostAction':
\ function('g:ScreenDumpLookForFFFDChars'),
\ }
call g:VerifyScreenDump(buf, basename, opts)
------------------------------------------------------------

related: #17704

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agoCI(screendump): Move an early-return test out of the loop
Aliaksei Budavei [Fri, 25 Jul 2025 18:05:37 +0000 (20:05 +0200)] 
CI(screendump): Move an early-return test out of the loop

And express the established indentation style of the file in
its modeline.

related: #17704

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agoCI: Include provenance in names of collected artifacts
Aliaksei Budavei [Fri, 25 Jul 2025 18:05:00 +0000 (20:05 +0200)] 
CI: Include provenance in names of collected artifacts

The currently given names to the uploaded archives are too
common and require (often manual) renaming for downloaded
archives that belong to different CI runs/attempts of a PR
and/or different PRs.  Let's automatically disambiguate such
archives from one another by giving them more unique names
for convenience and future reference.

related: #17704

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agoruntime(vim): Cleanup syntax tests
Doug Kearns [Fri, 25 Jul 2025 18:00:25 +0000 (20:00 +0200)] 
runtime(vim): Cleanup syntax tests

Improve formatting and naming consistency of the syntax tests.

closes: #17850

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agopatch 9.1.1591: VMS support can be improved v9.1.1591
Zoltan Arpadffy [Fri, 25 Jul 2025 17:16:09 +0000 (19:16 +0200)] 
patch 9.1.1591: VMS support can be improved

Problem:  VMS support can be improved
Solution: Merge chagnes from Steven M. Schweda
          (Zoltan)

closes: #17810

Co-authored-by: Steven M. Schweda <sms@antinode.info>
Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agopatch 9.1.1590: cannot perform autocompletion v9.1.1590
Girish Palya [Fri, 25 Jul 2025 16:48:53 +0000 (18:48 +0200)] 
patch 9.1.1590: cannot perform autocompletion

Problem:  cannot perform autocompletion
Solution: Add the 'autocomplete' option value
          (Girish Palya)

This change introduces the 'autocomplete' ('ac') boolean option to
enable automatic popup menu completion during insert mode. When enabled,
Vim shows a completion menu as you type, similar to pressing |i\_CTRL-N|
manually. The items are collected from sources defined in the
'complete' option.

To ensure responsiveness, this feature uses a time-sliced strategy:

- Sources earlier in the 'complete' list are given more time.
- If a source exceeds its allocated timeout, it is interrupted.
- The next source is then started with a reduced timeout (exponentially
  decayed).
- A small minimum ensures every source still gets a brief chance to
  contribute.

The feature is fully compatible with other |i_CTRL-X| completion modes,
which can temporarily suspend automatic completion when triggered.

See :help 'autocomplete' and :help ins-autocompletion for more details.

To try it out, use :set ac

You should see a popup menu appear automatically with suggestions. This
works seamlessly across:

- Large files (multi-gigabyte size)
- Massive codebases (:argadd thousands of .c or .h files)
- Large dictionaries via the `k` option
- Slow or blocking LSP servers or user-defined 'completefunc'

Despite potential slowness in sources, the menu remains fast,
responsive, and useful.

Compatibility: This mode is fully compatible with existing completion
methods. You can still invoke any CTRL-X based completion (e.g.,
CTRL-X CTRL-F for filenames) at any time (CTRL-X temporarily
suspends 'autocomplete'). To specifically use i_CTRL-N, dismiss the
current popup by pressing CTRL-E first.

---

How it works

To keep completion snappy under all conditions, autocompletion uses a
decaying time-sliced algorithm:

- Starts with an initial timeout (80ms).
- If a source does not complete within the timeout, it's interrupted and
  the timeout is halved for the next source.
- This continues recursively until a minimum timeout (5ms) is reached.
- All sources are given a chance, but slower ones are de-prioritized
  quickly.

Most of the time, matches are computed well within the initial window.

---

Implementation details

- Completion logic is mostly triggered in `edit.c` and handled in
  insexpand.c.

- Uses existing inc_compl_check_keys() mechanism, so no new polling
  hooks are needed.

- The completion system already checks for user input periodically; it
  now also checks for timer expiry.

---

Design notes

- The menu doesn't continuously update after it's shown to prevent
  visual distraction (due to resizing) and ensure the internal list
  stays synchronized with the displayed menu.

- The 'complete' option determines priority—sources listed earlier get
  more time.

- The exponential time-decay mechanism prevents indefinite collection,
  contributing to low CPU usage and a minimal memory footprint.

- Timeout values are intentionally not configurable—this system is
  optimized to "just work" out of the box. If autocompletion feels slow,
  it typically indicates a deeper performance bottleneck (e.g., a slow
  custom function not using `complete_check()`) rather than a
  configuration issue.

---

Performance

Based on testing, the total roundtrip time for completion is generally
under 200ms. For common usage, it often responds in under 50ms on an
average laptop, which falls within the "feels instantaneous" category
(sub-100ms) for perceived user experience.

| Upper Bound (ms) | Perceived UX
|----------------- |-------------
| <100 ms          | Excellent; instantaneous
| <200 ms          | Good; snappy
| >300 ms          | Noticeable lag
| >500 ms          | Sluggish/Broken

---

Why this belongs in core:

- Minimal and focused implementation, tightly integrated with existing
  Insert-mode completion logic.
- Zero reliance on autocommands and external scripting.
- Makes full use of Vim’s highly composable 'complete' infrastructure
  while avoiding the complexity of plugin-based solutions.
- Gives users C native autocompletion with excellent responsiveness and
  no configuration overhead.
- Adds a key UX functionality in a simple, performant, and Vim-like way.

closes: #17812

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agoruntime(ccomplete): return partial results on complete_check()
Maxim Kim [Fri, 25 Jul 2025 16:30:14 +0000 (18:30 +0200)] 
runtime(ccomplete): return partial results on complete_check()

closes: #17838

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agopatch 9.1.1589: Cannot disable cscope interface using configure v9.1.1589
Christian Brabandt [Fri, 25 Jul 2025 16:27:53 +0000 (18:27 +0200)] 
patch 9.1.1589: Cannot disable cscope interface using configure

Problem:  Cannot disable cscope interface using configure, because in
          feature.h FEAT_CSCOPE will always be enabled for huge builds
          (chdiza)
Solution: Don't define FEAT_CSCOPE from configure script but set the
          ENABLE_CSCOPE flag and check for the presence of that flag in
          feature.h

fixes: #17825
closes: #17842

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agopatch 9.1.1588: Vim9: cannot split dict inside command block v9.1.1588
Yegappan Lakshmanan [Fri, 25 Jul 2025 16:23:58 +0000 (18:23 +0200)] 
patch 9.1.1588: Vim9: cannot split dict inside command block

Problem:  Vim9: cannot split dict inside command block
          (lacygoill)
Solution: Remove the current restriction (Yegappan Lakshmanan).

fixes: #17841
closes: #17845

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agoruntime(netrw): upstream snapshot v184
Luca Saccarola [Fri, 25 Jul 2025 16:20:59 +0000 (18:20 +0200)] 
runtime(netrw): upstream snapshot v184

This change includes the following upstream commits:

- fix: remove black lines in directory listing
- fix: correctly create new file when using Lexplore
- refactor: remove print functionality

The main highlight is removing print functionality that was broken both
in neovim and vim.

closes: #17847

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 days agoruntime(vim): fix various indentation issues
lacygoill [Fri, 25 Jul 2025 16:16:09 +0000 (18:16 +0200)] 
runtime(vim): fix various indentation issues

fixes: #15123
closes: #17849

Signed-off-by: lacygoill <lacygoill@lacygoill.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 days agoruntime(doc): use correct possessive form
Christian Brabandt [Thu, 24 Jul 2025 17:51:04 +0000 (19:51 +0200)] 
runtime(doc): use correct possessive form

as suggested by chdiza

Signed-off-by: Christian Brabandt <cb@256bit.org>
6 days agopatch 9.1.1587: Wayland: timeout not updated before select() v9.1.1587
Foxe Chen [Thu, 24 Jul 2025 17:29:13 +0000 (19:29 +0200)] 
patch 9.1.1587: Wayland: timeout not updated before select()

Problem:  Wayland: timeout not updated before select()
Solution: Always set timeval struct before select() (Foxe Chen).

closes: #17836

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 days agopatch 9.1.1586: Vim9: can define an enum/interface in a function v9.1.1586
Yegappan Lakshmanan [Thu, 24 Jul 2025 17:14:51 +0000 (19:14 +0200)] 
patch 9.1.1586: Vim9: can define an enum/interface in a function

Problem:  Vim9: can define an enum/interface in a function
          (lacygoill)
Solution: Give an error when defining an enum or an interface inside a
          function (Yegappan Lakshmanan)

fixes: #17835
fixes: #17837
closes: #17837

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 days agoruntime(vim): Update base syntax, match enum constructor type args
Doug Kearns [Thu, 24 Jul 2025 16:54:16 +0000 (18:54 +0200)] 
runtime(vim): Update base syntax, match enum constructor type args

closes: #17840

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agoruntime(vim): Update base syntax, match generic functions
Doug Kearns [Wed, 23 Jul 2025 19:25:57 +0000 (21:25 +0200)] 
runtime(vim): Update base syntax, match generic functions

Match Vim9 generic functions, added in #17313.

closes: #17722

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agoruntime(ccomplete): use complete_check() in ccomplete plugin
Maxim Kim [Wed, 23 Jul 2025 19:20:46 +0000 (21:20 +0200)] 
runtime(ccomplete): use complete_check() in ccomplete plugin

Add complete_check() to ccomplete completion script to avoid UI hangs
and keep Vim responsive as ccomplete can be slow on huge files.

closes: #17826

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agoruntime(editorconfig): drop mkzip.sh
Christian Brabandt [Wed, 23 Jul 2025 19:12:37 +0000 (21:12 +0200)] 
runtime(editorconfig): drop mkzip.sh

this is not needed here, so let's drop mkzip.sh as requested per
https://github.com/vim/vim/commit/e5e04306bf02aa4ad488558dd593cf5c3b72f9b7#diff-97da9d3de12ae57e69f1287447808b7c30be2d540b3e54dbbe12e7880b0611d0

Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agopatch 9.1.1585: Wayland: gvim still needs GVIM_ENABLE_WAYLAND v9.1.1585
Christoffer Aasted [Wed, 23 Jul 2025 19:05:51 +0000 (21:05 +0200)] 
patch 9.1.1585: Wayland: gvim still needs GVIM_ENABLE_WAYLAND

Problem:  Wayland: gvim still needs GVIM_ENABLE_WAYLAND
Solution: Drop the GVIM_ENABLE_WAYLAND code, always enable both X11 and
          Wayland GUI support (Christoffer Aasted)

closes: #17817

Signed-off-by: Christoffer Aasted <chr.aasted@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agoruntime(misc): use :hor :term to ensure new term window is split horizontally
phanium [Wed, 23 Jul 2025 19:01:40 +0000 (21:01 +0200)] 
runtime(misc): use :hor :term to ensure new term window is split horizontally

Problem:  :term splits new window above in vim, but in nvim it change
          the buffer for current window
Solution: :hor term to ensure consistent splitting for Vim and Neovim

closes: #17822

Signed-off-by: phanium <91544758+phanen@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agoCI: increase test timeout to 30 minutes
Christian Brabandt [Wed, 23 Jul 2025 18:45:10 +0000 (20:45 +0200)] 
CI: increase test timeout to 30 minutes

Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agopatch 9.1.1584: using ints as boolean type v9.1.1584
Hirohito Higashi [Wed, 23 Jul 2025 18:41:11 +0000 (20:41 +0200)] 
patch 9.1.1584: using ints as boolean type

Problem:  using ints as bool
Solution: Include stdbool.h and start using bool type directly
          (Hirohito Higashi)

This is a test to see if using the boolean types cause any issues.
If this change causes issues on any platform, please reach out.

closes: #17830

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agocheck.vim: Improve po message checks
Antonio Giovanni Colombo [Wed, 23 Jul 2025 18:36:01 +0000 (20:36 +0200)] 
check.vim: Improve po message checks

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agotranslation(it): Update Italian translation
Antonio Giovanni Colombo [Wed, 23 Jul 2025 17:49:07 +0000 (19:49 +0200)] 
translation(it): Update Italian translation

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agoruntime(doc): Tweak documentation style in usr_90.txt
Hirohito Higashi [Wed, 23 Jul 2025 17:44:57 +0000 (19:44 +0200)] 
runtime(doc): Tweak documentation style in usr_90.txt

closes: #17832

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 days agopatch 9.1.1583: gvim window lost its icons v9.1.1583
Olaf Seibert [Wed, 23 Jul 2025 17:35:59 +0000 (19:35 +0200)] 
patch 9.1.1583: gvim window lost its icons

Problem:  Since patch 9.1.1199 the gvim window no longer had _NET_WM_ICON
          nor WM_HINTS icon information, for example when not using a
  Gnome or KDE desktop (after v9.1.1199)
Solution: Check if the icon theme as used in patch 1199 contains a gvim
          icon. If so, set the window's icon from that. Otherwise
  use the previous method (Olaf Seibert)

fixes: #17703
closes: #17814

Signed-off-by: Olaf Seibert <rhialto@falu.nl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 days agopatch 9.1.1582: style issue in vim9type.c and vim9generics.c v9.1.1582
Christian Brabandt [Tue, 22 Jul 2025 17:41:39 +0000 (19:41 +0200)] 
patch 9.1.1582: style issue in vim9type.c and vim9generics.c

Problem:  style issue in vim9type.c and vim9generics.c
          (after v9.1.1581 and v9.1.1580)
Solution: Update Style and place opening brace on a new line.

Signed-off-by: Christian Brabandt <cb@256bit.org>
8 days agoruntime(doc): remove mention of ftp.vim.org
Christian Brabandt [Tue, 22 Jul 2025 17:30:53 +0000 (19:30 +0200)] 
runtime(doc): remove mention of ftp.vim.org

fixes: #17819

Signed-off-by: Christian Brabandt <cb@256bit.org>
8 days agoruntime(doc): Tweak documentation style
Hirohito Higashi [Tue, 22 Jul 2025 17:01:17 +0000 (19:01 +0200)] 
runtime(doc): Tweak documentation style

closes: #17824

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 days agoruntime(doc): Fix typo in :help help-summary
Doug Kearns [Tue, 22 Jul 2025 16:19:09 +0000 (18:19 +0200)] 
runtime(doc): Fix typo in :help help-summary

fixes: #17816
closes: #17823

Co-authored-by: Alain Mosnier <alain@wanamoon.net>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 days agopatch 9.1.1581: possible memory leak in vim9generics.c v9.1.1581
Lidong Yan [Tue, 22 Jul 2025 16:15:57 +0000 (18:15 +0200)] 
patch 9.1.1581: possible memory leak in vim9generics.c

Problem:  possible memory leak in vim9generics.c
Solution: Free ret_free if ga_grow() fails and before returning
          (Lidong Yan).

In parse_generic_func_type_args() at vim9generics.c, we allocate memory
in ret_name and should free it by calling vim_free(ret_free). If
ga_grow on gfatab->gfat_args failed, we forget to call vim_free(ret_free)
thus would cause a leak. Add vim_free(ret_free) before return NULL.

closes: #17821

Signed-off-by: Lidong Yan <yldhome2d2@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 days agopatch 9.1.1580: possible memory leak in vim9type.c v9.1.1580
Lidong Yan [Tue, 22 Jul 2025 16:11:11 +0000 (18:11 +0200)] 
patch 9.1.1580: possible memory leak in vim9type.c

Problem:  possible memory leak in vim9type.c
Solution: Free tuple_types_ga if there was an error in
          type_type_add_types() (Lidong Yan)

In parse_type_tuple() at src/vim9type.c, we allocate memory
in `tuple_types_ga` by ga_grow(), but forget to free it when
tuple_type_add_types() fails. Replace `return NULL` with `goto on_err`
to fix leak.

closes: #17820

Signed-off-by: Lidong Yan <yldhome2d2@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 days agopatch 9.1.1579: Coverity complains about unchecked return value v9.1.1579
Yegappan Lakshmanan [Tue, 22 Jul 2025 16:04:15 +0000 (18:04 +0200)] 
patch 9.1.1579: Coverity complains about unchecked return value

Problem:  Coverity complains about unchecked return value in
          common_function() (after v9.1.1577)
Solution: Check the return value of skip_generic_func_type_args()
          and return in case of an error (Yegappan Lakshmanan)

closes: #17818

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 days agopatch 9.1.1578: configure: comment still mentions autoconf 2.71 v9.1.1578
Yee Cheng Chin [Tue, 22 Jul 2025 15:55:08 +0000 (17:55 +0200)] 
patch 9.1.1578: configure: comment still mentions autoconf 2.71

Problem:  configure: comment still mentions autoconf 2.71 to generate
          the configure script
Solution: Update the comment to use autoconf 2.72 instead (Yee Chin Cheng).

Vim v9.1.1369 updated the autoconf generation to be done using 2.72.
Update comments to reflect that.

closes: #17815

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
9 days agopatch 9.1.1577: Vim9: no generic support yet v9.1.1577
Yegappan Lakshmanan [Mon, 21 Jul 2025 19:36:08 +0000 (21:36 +0200)] 
patch 9.1.1577: Vim9: no generic support yet

Problem:  Vim9: no generic support yet
Solution: Add support for generic functions, funcrefs and object/class
          methods (Yegappan Lakshmanan).

closes: #17313

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
9 days agopatch 9.1.1576: cannot easily trigger wildcard expansion v9.1.1576
Girish Palya [Mon, 21 Jul 2025 19:26:32 +0000 (21:26 +0200)] 
patch 9.1.1576: cannot easily trigger wildcard expansion

Problem:  cannot easily trigger wildcard expansion
Solution: Introduce wildtrigger() function
          (Girish Palya)

This PR introduces a new `wildtrigger()` function.

See `:h wildtrigger()`

`wildtrigger()` behaves like pressing the `wildchar,` but provides a
more refined and controlled completion experience:

- Suppresses beeps when no matches are found.
- Avoids displaying irrelevant completions (like full command lists)
  when the prefix is insufficient or doesn't match.
- Skips completion if the typeahead buffer has pending input or if a
  wildmenu is already active.
- Does not print "..." before completion.

This is an improvement on the `feedkeys()` based autocompletion script
given in #16759.

closes: #17806

Signed-off-by: Girish Palya <girishji@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
9 days agoruntime(doc): clarify C99 constraints and portability assumptions
Damien Lejay [Mon, 21 Jul 2025 19:12:39 +0000 (21:12 +0200)] 
runtime(doc): clarify C99 constraints and portability assumptions

closes: #17748

Co-authored-by: dkearns <dougkearns@gmail.com>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
9 days agopatch 9.1.1575: tabpanel not drawn correctly with wrapped lines v9.1.1575
Hirohito Higashi [Mon, 21 Jul 2025 18:32:08 +0000 (20:32 +0200)] 
patch 9.1.1575: tabpanel not drawn correctly with wrapped lines

Problem:  tabpanel not drawn correctly with wrapped lines
          (utubo, after v9.1.1534)
Solution: Use Columns as width, not the frame width
          (Hirohito Higashi)

fixes: #17774
closes: #17809

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
9 days agopatch 9.1.1574: Dead code in mbyte.c v9.1.1574
Damien Lejay [Mon, 21 Jul 2025 18:25:33 +0000 (20:25 +0200)] 
patch 9.1.1574: Dead code in mbyte.c

Problem:  Dead code in mbyte.c
Solution: Delete the dead wcwidth()/iswprint() code
          (Damien Lejay)

These library calls have been disabled since patch 6.2.446 (2002) due to
display issues with Hebrew. They are also non-portable: wcwidth() is a
POSIX function and not available on MSVC or other non-POSIX platforms.
Keeping this code path adds complexity without benefit.

closes: #17811

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agoruntime(doc): mention the "pipefail" shell option
Christian Brabandt [Sun, 20 Jul 2025 15:32:51 +0000 (17:32 +0200)] 
runtime(doc): mention the "pipefail" shell option

related: #17787

Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agopatch 9.1.1573: Memory leak when pressing Ctrl-D in cmdline mode v9.1.1573
zeertzjq [Sun, 20 Jul 2025 14:50:01 +0000 (16:50 +0200)] 
patch 9.1.1573: Memory leak when pressing Ctrl-D in cmdline mode

Problem:  Memory leak when pressing Ctrl-D in cmdline mode
          (after 9.1.1571).
Solution: Free prev_cmdbuff before assigning to it.
          (zeertzjq).

Existing tests already cover this. This change fixes the CI failure.

closes: #17807

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agotranslation: mark vim.pot as binary
Illia Bobyr [Sun, 20 Jul 2025 14:47:05 +0000 (16:47 +0200)] 
translation: mark vim.pot as binary

`vim.pot` is included in the repository after

```gitcommit
commit 59bd74ed4c9ab366182c93bdc430b186729abbad
Author: Christian Brabandt <cb@256bit.org>
Date:   Sun Jul 13 08:26:57 2025 +0200

    translation: include vim.pot in the repository
```

And it adds quite a lot of noise to the diffs since then.  See the
reasoning in a comment in `.gitattributes`.

I'm not 100% sure that marking it as binary would have no negative side
effects.  But I was not able to find a better option in `git help
attributes`.

Solution suggested in

```gitcommit
commit 5d552d652b0197063565ab937d30f92a9ed28545
Author: Christian Brabandt <cb@256bit.org>
Date:   Tue Jul 15 20:42:48 2025 +0200

    translation: ignore vim.pot creation date, regenerate it, rm allfiles

Signed-off-by: Christian Brabandt <cb@256bit.org>
```

does not seem to be solving the problem.  It only hides the
`POT-Creation` line from the `vim.pot` diff.  Maybe a more elaborate
filter could be used - one that replaces lines numbers in `vim.pot` with
`xxxx`, thus removing the most annoying and useless part of the diff.

One downside is that it requires everyone to install such a filter
locally - it can not be part of the repo config, as far as I understand.

closes: #17775

Signed-off-by: Illia Bobyr <illia.bobyr@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agotranslation: do not add message location as comments into vim.pot
Christian Brabandt [Sun, 20 Jul 2025 14:31:46 +0000 (16:31 +0200)] 
translation: do not add message location as comments into vim.pot

Let's add the --no-location to the xgettext command line call, so that
the generated vim.pot file does not contain the message location. Those
will get out of date soon and we don't want to update vim.pot just
because the location in a comment changes.

Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agopatch 9.1.1572: expanding $var does not escape whitespace for 'path' v9.1.1572
Miguel Barro [Sun, 20 Jul 2025 08:47:14 +0000 (10:47 +0200)] 
patch 9.1.1572: expanding $var does not escape whitespace for 'path'

Problem:  expanding $var does not escape whitespace for 'path'
Solution: Escape whitespace when expanding 'path' option.
          (Miguel Barro)

closes: #17801

Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agopatch 9.1.1571: CmdlineChanged triggered to often v9.1.1571
Girish Palya [Sun, 20 Jul 2025 08:41:02 +0000 (10:41 +0200)] 
patch 9.1.1571: CmdlineChanged triggered to often

Problem:  The CmdlineChanged event was firing unnecessarily, even when
          the command line's content hadn't actually changed.

Solution: I've added a check to compare the command-line buffer's state
          before and after key processing. The `CmdlineChanged` event
          now only triggers if the buffer's contents are genuinely
          different (Girish Palya).

closes: #17803

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agoruntime(rust): improve loading time
Christian Brabandt [Sun, 20 Jul 2025 08:38:16 +0000 (10:38 +0200)] 
runtime(rust): improve loading time

fixes: #17745
closes: #17749

Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agoruntime(doc): Update help syntax, match :autocmd options
Doug Kearns [Sun, 20 Jul 2025 08:34:32 +0000 (10:34 +0200)] 
runtime(doc): Update help syntax, match :autocmd options

- Match :autocmd options and special buffer pattern.
- Normalise ellipsis (three dots) in Ex command argument lists.

closes: #17793

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agopatch 9.1.1570: Copilot suggested some improvements in cmdexpand.c v9.1.1570
John Marriott [Sun, 20 Jul 2025 08:28:26 +0000 (10:28 +0200)] 
patch 9.1.1570: Copilot suggested some improvements in cmdexpand.c

Problem:  Copilot suggested some improvements in cmdexpand.c
          (after v9.1.1556)
Solution: Use better variable names and comments
          (John Marriott).

closes: #17795

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agotranslation(de): Update German translations
Christian Brabandt [Sun, 20 Jul 2025 08:26:02 +0000 (10:26 +0200)] 
translation(de): Update German translations

Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agotranslation(it): Update Italian translations
Antonio Giovanni Colombo [Sun, 20 Jul 2025 08:00:55 +0000 (10:00 +0200)] 
translation(it): Update Italian translations

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agopatch 9.1.1569: tests: Vim9 tests can be improved v9.1.1569
Yegappan Lakshmanan [Sun, 20 Jul 2025 07:55:07 +0000 (09:55 +0200)] 
patch 9.1.1569: tests: Vim9 tests can be improved

Problem:  tests: Vim9 tests can be improved
Solution: In Test_has_func_shortcircuit(), move the test functions to a
          separate script (Yegappan Lakshmanan)

closes: #17796

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agoruntime(doc): Tweak documentation about tab pages
Hirohito Higashi [Sun, 20 Jul 2025 07:52:28 +0000 (09:52 +0200)] 
runtime(doc): Tweak documentation about tab pages

closes: #17799

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agoruntime(uc): include uc filetype plugin
Riley Bruins [Sun, 20 Jul 2025 07:49:57 +0000 (09:49 +0200)] 
runtime(uc): include uc filetype plugin

closes: #17802

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agotranslation: comment out deletion of *.pot file in Makefiles
RestorerZ [Sun, 20 Jul 2025 07:47:19 +0000 (09:47 +0200)] 
translation: comment out deletion of *.pot file in Makefiles

This is needed since commit 59bd74e included vim.pot in the repository.

closes: #17800

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agopatch 9.1.1568: need a few more default highlight groups v9.1.1568
Maxim Kim [Sun, 20 Jul 2025 07:32:11 +0000 (09:32 +0200)] 
patch 9.1.1568: need a few more default highlight groups

Problem:  need a few more default highlight groups
Solution: Add Bold, Italic and BoldItalic default highlight groups
          (Maxim Kim).

related: https://github.com/vim/vim/pull/17598#issuecomment-3007320523
closes: #17804

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
10 days agopatch 9.1.1567: crash when using inline diff mode v9.1.1567
Yee Cheng Chin [Sun, 20 Jul 2025 07:19:13 +0000 (09:19 +0200)] 
patch 9.1.1567: crash when using inline diff mode

Problem:  Crash when using inline diff mode
          (Ilya Grigoriev)
Solution: Set tp_diffbuf to NULL when skipping a diff block
          (Yee Cheng Chin).

Fix an array out of bounds crash when using diffopt+=inline:char when 4
or more buffers are being diff'ed. This happens when one of the blocks
is empty. The inline highlight logic skips using that buffer's block,
but when another buffer is used later and calls diff_read() to merge the
diff blocks together, it could erroneously consider the empty block's
diff info which has not been initialized, leaving to diff numbers that
are invalid. Later on the diff num is used without bounds checking which
leads to the crash.

Fix this by making sure to unset tp_diffbuf to NULL when we skip a
block, so diff_read() will not consider this buffer to be used within
inline diff. Also, add more bounds checking just to be safe.

closes: #17805

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 days agopatch 9.1.1566: self-referenced enum may not get freed v9.1.1566
Yegappan Lakshmanan [Fri, 18 Jul 2025 19:50:20 +0000 (21:50 +0200)] 
patch 9.1.1566: self-referenced enum may not get freed

Problem:  self-referenced enum may not get freed
Solution: Test if it can be freed (Yegappan Lakshmanan)

closes: #17743

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 days agopatch 9.1.1565: configure: does not consider tiny version for wayland v9.1.1565
Christoffer Aasted [Fri, 18 Jul 2025 18:37:41 +0000 (20:37 +0200)] 
patch 9.1.1565: configure: does not consider tiny version for wayland

Problem:  configure: does not consider tiny version for wayland
Solution: Do not try to enable wayland for a tiny vim version
          (Christoffer Aasted).

closes: #17783

Signed-off-by: Christoffer Aasted <chr.aasted@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 days agoruntime(lf): update syntax to support lf version r36
Andis Spriņķis [Fri, 18 Jul 2025 18:34:27 +0000 (20:34 +0200)] 
runtime(lf): update syntax to support lf version r36

Adds the lf release 36 specific syntax highlighting changes.

related: andis-sprinkis/lf-vim#22 by @CatsDeservePets

closes: #17792

Co-authored-by: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com>
Signed-off-by: Andis Spriņķis <andis@sprinkis.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 days agoruntime(sh): properly delete shell commands in syntax file
Christoffer Aasted [Fri, 18 Jul 2025 18:25:59 +0000 (20:25 +0200)] 
runtime(sh): properly delete shell commands in syntax file

closes: #17785

Signed-off-by: Christoffer Aasted <chr.aasted@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 days agoUpdate editorconfig and the documented C-style for sign.c/sound.c
Damien Lejay [Fri, 18 Jul 2025 18:18:11 +0000 (20:18 +0200)] 
Update editorconfig and the documented C-style for sign.c/sound.c

closes: #17786

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 days agoruntime(vim): Update base syntax and generator, improve command/function distinction
Doug Kearns [Fri, 18 Jul 2025 18:12:29 +0000 (20:12 +0200)] 
runtime(vim): Update base syntax and generator, improve command/function distinction

- Match Ex command modifiers and functions with the same name correctly.
  E.g., :browse and browse().
- Match full :eval command.

closes: #17789

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 days agopatch 9.1.1564: crash when opening popup to closing buffer v9.1.1564
Sean Dewar [Fri, 18 Jul 2025 18:09:47 +0000 (20:09 +0200)] 
patch 9.1.1564: crash when opening popup to closing buffer

Problem:  Can open a popup window to a closing buffer, leading to the
          buffer remaining open in the window after it's soon unloaded,
          causing crashes.
Solution: Check b_locked_split when opening a popup window to an
          existing buffer (Sean Dewar).

closes: #17790

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 days agotranslation: mark vim.pot as linguist-generated, ignore msg locations in vim.pot
Christian Brabandt [Fri, 18 Jul 2025 18:04:00 +0000 (20:04 +0200)] 
translation: mark vim.pot as linguist-generated, ignore msg locations in vim.pot

Update the textconv filter to filter out changes in the comments
pointing to the location of the message.

Also remove the comments in vim.pot that mention the message location.
Since those will be ignored using vims textconv filter, it does not make
sense to keep them, they would get out of sync anyhow.

closes: #17782

Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agopatch 9.1.1563: completion: ruler may disappear v9.1.1563
Girish Palya [Thu, 17 Jul 2025 20:02:57 +0000 (22:02 +0200)] 
patch 9.1.1563: completion: ruler may disappear

Problem:  The ruler disappears after typing the second character during
          insert mode completion, even when completion messages are
          suppressed ('shortmess' includes "c"). This makes the UI
          appear inconsistent.
Solution: Ensure the ruler is restored during screen redraw when popup
          completion is active (Girish Palya).

Notes:
No new tests were added, as existing screen dump tests were updated to
reflect the corrected behavior.

closes: #17770

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agopatch 9.1.1562: close button always visible in the 'tabline' v9.1.1562
Girish Palya [Thu, 17 Jul 2025 19:56:16 +0000 (21:56 +0200)] 
patch 9.1.1562: close button always visible in the 'tabline'

Problem:  close button "X" is visible in the non-GUI 'tabline', even
          when the mouse is disabled
Solution: only show the button when 'mouse' contains any of the flags
          "anvi" (Girish Palya)

The tabline always displays an "X" (close) button, and the info popup
shows both a close button and a resize handle—even when the mouse is
disabled. These UI elements are only actionable with the mouse and serve
no purpose for keyboard users who disable the mouse. Displaying
non-functional, clickable elements in a non-GUI environment is
misleading and adds unnecessary visual clutter.

So remove the close button and resize handle when the mouse is disabled.
They appear again when mouse is enabled.

closes: #17765

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agoruntime(python): Highlight f-strings in Python
Rob B [Thu, 17 Jul 2025 19:22:40 +0000 (21:22 +0200)] 
runtime(python): Highlight f-strings in Python

fixes: #10734
fixes: #14033
closes: #17767

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Zvezdan Petkovic <zpetkovic@acm.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agoruntime(vim): Update base syntax, match "any" type distinctly
Doug Kearns [Thu, 17 Jul 2025 19:19:55 +0000 (21:19 +0200)] 
runtime(vim): Update base syntax, match "any" type distinctly

Allow for special highlighting of the "any" Vim9 type.

Addresses comment
https://github.com/vim/vim/pull/17722#issuecomment-3075531052

closes: #17769

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agopatch 9.1.1561: configure: wayland test can be improved v9.1.1561
Christoffer Aasted [Thu, 17 Jul 2025 19:11:06 +0000 (21:11 +0200)] 
patch 9.1.1561: configure: wayland test can be improved

Problem:  configure: wayland test can be improved
Solution: Define $WAYLAND_CFLAGS, simplify the wayland tests
          (Christoffer Aasted).

closes: #17772

Signed-off-by: Christoffer Aasted <chr.aasted@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agopatch 9.1.1560: configure: uses $PKG_CONFIG before it is defined v9.1.1560
Christoffer Aasted [Thu, 17 Jul 2025 19:05:59 +0000 (21:05 +0200)] 
patch 9.1.1560: configure: uses $PKG_CONFIG before it is defined

Problem:  configure: uses $PKG_CONFIG before it is defined
Solution: Define $PKG_CONFIG earlier in the script (Christoffer Aasted).

closes: #17771

Signed-off-by: Christoffer Aasted <chr.aasted@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agopatch 9.1.1559: tests: Test_popup_complete_info_01() fails when run alone v9.1.1559
zeertzjq [Thu, 17 Jul 2025 18:40:04 +0000 (20:40 +0200)] 
patch 9.1.1559: tests: Test_popup_complete_info_01() fails when run alone

Problem:  tests: Test_popup_complete_info_01() fails when run alone.
Solution: Set buffer-local competeopt+=noinsert and add missing cleanup
          in Test_popup_complete() (zeertzjq).

closes: #17773

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agoruntime(doc): fix claim that 'CTRL-W CTRL-C' and 'CTRL-W c' are the same
Emilien Breton [Thu, 17 Jul 2025 18:36:37 +0000 (20:36 +0200)] 
runtime(doc): fix claim that 'CTRL-W CTRL-C' and 'CTRL-W c' are the same

closes: #17776

Signed-off-by: Emilien Breton <bricktech2000@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agoruntime(doc): handle newlines in base64 string encode example
zeertzjq [Thu, 17 Jul 2025 18:30:55 +0000 (20:30 +0200)] 
runtime(doc): handle newlines in base64 string encode example

closes: #17777

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agoruntime(vim): Update base syntax, fix incorrect function error
Doug Kearns [Thu, 17 Jul 2025 18:29:07 +0000 (20:29 +0200)] 
runtime(vim): Update base syntax, fix incorrect function error

Don't match lower-case function names as errors when the qualifier
includes a dict/list accessor.

This is a less than perfect fix until qualified function call matching
is reworked.

fixes: #17766
closes: #17780

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agoruntime(compiler): Add PHPStan compiler
Dietrich Moerman [Thu, 17 Jul 2025 18:27:18 +0000 (20:27 +0200)] 
runtime(compiler): Add PHPStan compiler

closes: #17781

Signed-off-by: Dietrich Moerman <dietrich.moerman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agotranslation: regenerate vim.pot, ignore version.c changes
Christian Brabandt [Thu, 17 Jul 2025 18:20:35 +0000 (20:20 +0200)] 
translation: regenerate vim.pot, ignore version.c changes

Regenerate vim.pot because of a wording update in optwin.vim for the
diffanchors feature.

While at it, update the textconv filter to ignore all lines
containing version.c because those change just by incrementing
the Vim patch number *grummel*

Signed-off-by: Christian Brabandt <cb@256bit.org>
13 days agopatch 9.1.1558: str2blob() treats NULL string and empty string differently v9.1.1558
zeertzjq [Thu, 17 Jul 2025 18:12:17 +0000 (20:12 +0200)] 
patch 9.1.1558: str2blob() treats NULL string and empty string differently

Problem:  str2blob() treats NULL string and empty string differently
Solution: Treats a NULL string the same as an empty string
          (zeertzjq).

closes: #17778

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1557: not possible to anchor specific lines in difff mode v9.1.1557
Yee Cheng Chin [Wed, 16 Jul 2025 18:36:54 +0000 (20:36 +0200)] 
patch 9.1.1557: not possible to anchor specific lines in difff mode

Problem:  not possible to anchor specific lines in difff mode
Solution: Add support for the anchoring lines in diff mode using the
          'diffanchor' option (Yee Cheng Chin).

Adds support for anchoring specific lines to each other while viewing a
diff. While lines are anchored, they are guaranteed to be aligned to
each other in a diff view, allowing the user to control and inform the
diff algorithm what the desired alignment is. Internally, this is done
by splitting up the buffer at each anchor and run the diff algorithm on
each split section separately, and then merge the results back for a
logically consistent diff result.

To do this, add a new "diffanchors" option that takes a list of
`{address}`, and a new "diffopt" option value "anchor". Each address
specified will be an anchor, and the user can choose to use any type of
address, including marks, line numbers, or pattern search. Anchors are
sorted by line number in each file, and it's possible to have multiple
anchors on the same line (this is useful when doing multi-buffer diff).
Update documentation to provide examples.

This is similar to Git diff's `--anchored` flag. Other diff tools like
Meld/Araxis Merge also have similar features (called "synchronization
points" or "synchronization links"). We are not using Git/Xdiff's
`--anchored` implementation here because it has a very limited API
(it requires usage of the Patience algorithm, and can only anchor
unique lines that are the same across both files).

Because the user could anchor anywhere, diff anchors could result in
adjacent diff blocks (one block is directly touching another without a
gap), if there is a change right above the anchor point. We don't want
to merge these diff blocks because we want to line up the change at the
anchor. Adjacent diff blocks were first allowed when linematch was
added, but the existing code had a lot of branched paths where
line-matched diff blocks were handled differently. As a part of this
change, refactor them to have a more unified code path that is
generalized enough to handle adjacent diff blocks correctly and without
needing to carve in exceptions all over the place.

closes: #17615

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1556: string handling in cmdexpand.c can be improved v9.1.1556
John Marriott [Wed, 16 Jul 2025 18:09:13 +0000 (20:09 +0200)] 
patch 9.1.1556: string handling in cmdexpand.c can be improved

Problem:  string handling in cmdexpand.c can be improved
Solution: Improve string manipulation in cmdexpand.c (John Marriott).

This PR does the following:

In cmdline_fuzzy_completion_supported():
- replace the series of if tests with a switch

In expand_shellcmd_onedir():
- move the code to concatenate path and pattern to expand_shellcmd().
  This allows us to slightly simplify the argument list to pass the fully
  pathed pattern and the length of the path in the pattern (0 if no path)
- factor out calls to STRMOVE()

In expand_shellcmd():
- factor out calls to STRMOVE() in the first for loop.
- reorganise the second for loop by:
  a) only calling vim_strchr() if s is not at the end of the string
  b) making sure that when the path and pattern are concatenated they fit
     inside buf
  c) concatenating path and pattern and pass to expand_shellcmd_onedir()

In globpath():
- slightly improve logic that determines if the complete path will fit
  inside the buffer

In f_getcompletion():
- replace the series of if tests with a switch
- factor out calls to STRLEN()

In copy_substring_from_pos():
- factor out the call to STRLEN()

closes: #17742

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1555: completion: repeated insertion of leader v9.1.1555
Girish Palya [Wed, 16 Jul 2025 17:53:56 +0000 (19:53 +0200)] 
patch 9.1.1555: completion: repeated insertion of leader

Problem:  completion: repeated insertion and deletion of complete
          functions
Solution: Remove unnecessary insertion and deletion of leader text
          ('compl_orig_text') during expansion of function present in
          'complete' option (Girish Palya).

closes: #17738

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1554: crash when omni-completion opens command-line window v9.1.1554
Girish Palya [Wed, 16 Jul 2025 16:54:54 +0000 (18:54 +0200)] 
patch 9.1.1554: crash when omni-completion opens command-line window

Problem:  Vim crashes during omnifunc completion inside the command-line
          window ("q:") if the completion item attempts to open an "info"
          preview window. This leads to a failed assert during execution.
Solution: Avoid opening preview windows while inside the command-line
          window to prevent the crash (Girish Palya).

closes: #17764

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1553: Vim9: crash when accessing a variable in if condition v9.1.1553
Yegappan Lakshmanan [Wed, 16 Jul 2025 16:34:59 +0000 (18:34 +0200)] 
patch 9.1.1553: Vim9: crash when accessing a variable in if condition

Problem:  Vim9: crash when accessing a variable in if condition
          (lxhillwind)
Solution: Skip indexing a list/tuple/dict/blob when short-circuiting an
          if condition check (Yegappan Lakshmanan)

fixes: #17756
closes: #17768

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agoruntime(tar): update minimum Vim version required for tar.vim
Christian Brabandt [Wed, 16 Jul 2025 16:28:11 +0000 (18:28 +0200)] 
runtime(tar): update minimum Vim version required for tar.vim

related: #17733

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1552: [security]: path traversal issue in tar.vim v9.1.1552
Christian Brabandt [Tue, 15 Jul 2025 19:54:00 +0000 (21:54 +0200)] 
patch 9.1.1552: [security]: path traversal issue in tar.vim

Problem:  [security]: path traversal issue in tar.vim
          (@ax)
Solution: warn the user for such things, drop leading /, don't
          forcefully overwrite files when writing temporary files,
          refactor autoload/tar.vim

tar.vim: drop leading / in path names

A tar archive containing files with leading `/` may cause confusions as
to where the content is extracted.  Let's make sure we drop the leading
`/` and use a relative path instead.

Also while at it, had to refactor it quite a bit and increase the
minimum supported Vim version to v9. Also add a test for some basic tar
functionality

closes: #17733

2 weeks agopatch 9.1.1551: [security]: path traversal issue in zip.vim v9.1.1551
Christian Brabandt [Tue, 15 Jul 2025 19:43:01 +0000 (21:43 +0200)] 
patch 9.1.1551: [security]: path traversal issue in zip.vim

Problem:  [security]: path traversal issue in zip.vim (@ax)
Solution: drop leading ../ on write of zipfiles, don't forcefully
          overwrite existing files

A zip plugin which contains filenames with leading '../'  may cause
confusion as to where the content will be extracted.  Let's drop such
things and make sure we use a relative filename instead and don't
forcefully overwrite temporary files. Also, warn the user of such
things.

related: #17733

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1550: defaults: 'showcmd' is not enabled in non-compatible mode on Unix v9.1.1550
Christian Brabandt [Tue, 15 Jul 2025 19:26:25 +0000 (21:26 +0200)] 
patch 9.1.1550: defaults: 'showcmd' is not enabled in non-compatible mode on Unix

Problem:  defaults: 'showcmd' is not enabled in non-compatible mode on
          Unix
Solution: Always enable 'showcmd' in non-compatible mode, drop it from
          defaults.vim.

'showcmd' was already always enabled in Vim compatible mode except for
UNIX environments. So let's just enable it always, there is no good
reason why UNIX platforms should be handled differently than other
platforms, especially since `defaults.vim` did enable this option
anyhow.

closes: #17739

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1549: filetype: pkl files are not recognized v9.1.1549
Riley Bruins [Tue, 15 Jul 2025 19:21:29 +0000 (21:21 +0200)] 
patch 9.1.1549: filetype: pkl files are not recognized

Problem:  filetype: pkl files are not recognized
Solution: detect *.pkl files as pkl filetype, include
          a filetype plugin (Riley Bruins)

References:
https://pkl-lang.org/
https://github.com/apple/pkl

closes: #17751

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1548: filetype: OpenFGA files are not recognized v9.1.1548
Riley Bruins [Tue, 15 Jul 2025 19:17:02 +0000 (21:17 +0200)] 
patch 9.1.1548: filetype: OpenFGA files are not recognized

Problem:  filetype: OpenFGA files are not recognized
Solution: detect *.fga files as fga filetype, include an fga filetype
          plugin (Riley Bruins)

References:
https://github.com/openfga
https://marketplace.visualstudio.com/items?itemName=openfga.openfga-vscode

closes: #17752

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agoruntime(swig): add 'comments', 'commentstring' in filetype plugin
Riley Bruins [Tue, 15 Jul 2025 19:13:02 +0000 (21:13 +0200)] 
runtime(swig): add 'comments', 'commentstring' in filetype plugin

Reference:
https://www.swig.org/Doc1.3/SWIG.html#SWIG_nn5

closes: #17753

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agoruntime(twig): include twig filetype plugin
Riley Bruins [Tue, 15 Jul 2025 19:09:43 +0000 (21:09 +0200)] 
runtime(twig): include twig filetype plugin

closes: #17754

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1547: Wayland: missing ifdef v9.1.1547
Foxe Chen [Tue, 15 Jul 2025 19:06:37 +0000 (21:06 +0200)] 
patch 9.1.1547: Wayland: missing ifdef

Problem:  Wayland: missing ifdef
Solution: Add #ifdef around ch_log() call
          (Foxe Chen)

closes: #17763

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agotranslation: ignore vim.pot creation date, regenerate it, rm allfiles
Christian Brabandt [Tue, 15 Jul 2025 18:42:48 +0000 (20:42 +0200)] 
translation: ignore vim.pot creation date, regenerate it, rm allfiles

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1546: Vim9: error with has() and short circuit evaluation v9.1.1546
Yegappan Lakshmanan [Tue, 15 Jul 2025 18:26:52 +0000 (20:26 +0200)] 
patch 9.1.1546: Vim9: error with has() and short circuit evaluation

Problem:  Vim9: error with has() and short circuit evaluation
Solution: Only eval, if ctx_skip is not SKIP_YES (Yegappan Lakshmanan).

fixes: #17750
closes: #17755

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agoruntime(python2): Highlight b-strings in Python 2.7
Rob B [Tue, 15 Jul 2025 18:23:59 +0000 (20:23 +0200)] 
runtime(python2): Highlight b-strings in Python 2.7

related: #14033
related: #17726

closes: #17757

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agoruntime(doc): Tweak documentation
Hirohito Higashi [Tue, 15 Jul 2025 18:06:49 +0000 (20:06 +0200)] 
runtime(doc): Tweak documentation

closes: #17759

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agopatch 9.1.1545: typo in os_unix.c v9.1.1545
Foxe Chen [Tue, 15 Jul 2025 18:02:57 +0000 (20:02 +0200)] 
patch 9.1.1545: typo in os_unix.c

Problem:  Typo in os_unix.c
Solution: Correct the typo (Foxe Chen)

closes: #17761

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agoruntime(python): highlight bytes in python
Rob B [Mon, 14 Jul 2025 20:30:59 +0000 (22:30 +0200)] 
runtime(python): highlight bytes in python

- Highlight bytes literals
- Do not highlight Unicode escape sequences in bytes literals

fixes: #14033
fixes: #17726
closes: #17728

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 weeks agoruntime(python2): highlight unicode strings in python2
Rob B [Mon, 14 Jul 2025 20:21:44 +0000 (22:21 +0200)] 
runtime(python2): highlight unicode strings in python2

fixes: #14033
fixes: #17726
closes: #17729

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>