]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
7 weeks agoruntime(vue): set 'com' and 'cms' options in ftplugin
Riley Bruins [Mon, 9 Jun 2025 18:55:31 +0000 (20:55 +0200)] 
runtime(vue): set 'com' and 'cms' options in ftplugin

closes: #17479

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1446: filetype: cuda-gdb config files are not recognized v9.1.1446
Wu, Zhenyu [Mon, 9 Jun 2025 18:48:24 +0000 (20:48 +0200)] 
patch 9.1.1446: filetype: cuda-gdb config files are not recognized

Problem:  filetype: cuda-gdb config files are not recognized
Solution: detect .cuda-gdbinit and cuda-gdbinit files as gdb filetype
          (Wu Zhenyu)

closes: #17471

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1445: negative matchfuzzy scores although there is a match v9.1.1445
Girish Palya [Mon, 9 Jun 2025 18:43:03 +0000 (20:43 +0200)] 
patch 9.1.1445: negative matchfuzzy scores although there is a match

Problem:  negative matchfuzzy scores although there is a match
          (Maxim Kim)
Solution: reset the score if a match has been found but the score is
          negative (Girish Palya)

The fuzzy algorithm may miss some matches in long strings due to recursion
limits. As a result, the score can end up negative even when matches exist.
In such cases, reset the score to ensure it is non-negative.

fixes: ##17449
closes: #17469

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1444: Unused assignment in set_fuzzy_score() v9.1.1444
zeertzjq [Mon, 9 Jun 2025 18:34:57 +0000 (20:34 +0200)] 
patch 9.1.1444: Unused assignment in set_fuzzy_score()

Problem:  Unused assignment in set_fuzzy_score() (after 9.1.1441).
Solution: Remove it (zeertzjq).

closes: #17472

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1443: potential buffer underflow in insertchar() v9.1.1443
jinyaoguo [Mon, 9 Jun 2025 18:31:17 +0000 (20:31 +0200)] 
patch 9.1.1443: potential buffer underflow in insertchar()

Problem:  potential buffer underflow in insertchar()
Solution: verify that end_len is larger than zero
          (jinyaoguo)

When parsing the end-comment leader, end_len can be zero if
copy_option_part() writes no characters. The existing check
unconditionally accessed lead_end[end_len-1], causing potential
underflow when end_len == 0.

This change adds an end_len > 0 guard to ensure we only index lead_end
if there is at least one character.

closes: #17476

Signed-off-by: jinyaoguo <guo846@purdue.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1442: tests: Test_diff_fold_redraw() is insufficient v9.1.1442
Gary Johnson [Mon, 9 Jun 2025 18:19:35 +0000 (20:19 +0200)] 
patch 9.1.1442: tests: Test_diff_fold_redraw() is insufficient

Problem:  tests: Test_diff_fold_redraw() is insufficient
          (after v9.1.1439, Christ van Willegen)
Solution: improve the test (Gary Johnson)

The original Test_diff_fold_redraw() function, added 2025-06-08 at patch
9.1.1439, had a bug and didn't do a very good job of testing the fold
behavior.  This new version is simpler and more thorough.

The bug was that it checked the fold state of one window twice instead
of checking both windows.

closes: #17492

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agoruntime(netrw): cleanup Decho related comments
Luca Saccarola [Mon, 9 Jun 2025 14:04:05 +0000 (16:04 +0200)] 
runtime(netrw): cleanup Decho related comments

closes: #17465

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1441: completion: code can be improved v9.1.1441
Girish Palya [Sun, 8 Jun 2025 14:20:06 +0000 (16:20 +0200)] 
patch 9.1.1441: completion: code can be improved

Problem:  completion: code can be improved
Solution: remove reposition_match() and use mergesort_list(),
          for fuzzy completion, sort by fuzzy score immediately after
          setting a new leader (Girish Palya)

closes: #17460

Co-authored-by: glepnir <glephunter@gmail.com>
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agoruntime(nginx): Add NGINX directive for background cache updates
S0AndS0 [Sun, 8 Jun 2025 14:15:00 +0000 (16:15 +0200)] 
runtime(nginx): Add NGINX directive for background cache updates

Docs: https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_background_update

closes: #17458

Signed-off-by: S0AndS0 <strangerthanbland@gmail.com>
Signed-off-by: Chris Aumann <me@chr4.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1440: too many strlen() calls in os_win32.c v9.1.1440
John Marriott [Sun, 8 Jun 2025 14:05:53 +0000 (16:05 +0200)] 
patch 9.1.1440: too many strlen() calls in os_win32.c

Problem:  too many strlen() calls in os_win32.c
Solution: refactor code and remove calls to strlen()
          (John Marriott)

The following changes have been made:
- In mch_init_g():
  - refactor to remove calls to STRLEN().
  - use vim_strnsave() instead of vim_strsave().
  - set a flag if vimrun_path is stored in allocated memory so it can be
     freed at exit.
- In mch_exit() free vimrun_path if it was stored in allocated memory.
- In fname_case() make a small optimisation by measuring the length of
  name only if needed.
- In copy_extattr() make a small optimisation by replacing call to
  STRCAT() with STRCPY().

closes: #17462

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1439: Last diff folds not merged v9.1.1439
Gary Johnson [Sun, 8 Jun 2025 14:00:06 +0000 (16:00 +0200)] 
patch 9.1.1439: Last diff folds not merged

Problem:  Last diff folds not merged (after v8.1.1922)
Solution: loop over all windows in the current tabpage and update all
          folds (Gary Johnson)

This commit fixes a bug where the last two folds of a diff are not
merged when the last difference between the two diff'd buffers is
resolved.

Normally, when two buffers are diff'd, folding is used to show only the
text that differs and to hide the text that is the same between the two
buffers.  When a difference is resolved by making a block of text the
same in both buffers, the folds are updated to merge that block with the
folds above and below it into one closed fold.

That updating of the folds did not occur when the block of text was the
last diff block in the buffers.

The bug was introduced by this patch on August 24, 2019:

    patch 8.1.1922: in diff mode global operations can be very slow

    Problem:    In diff mode global operations can be very slow.
    Solution:   Do not call diff_redraw() many times, call it once when
redrawing.  And also don't update folds multiple times.

Unfortunately, folds were then not updated often enough.

The problem was fixed by adding a short loop to the ex_diffgetput()
function in diff.c to update all the folds in the current tab when the
last difference is removed.

A test for this was added to test_diffmode.vim.  Two of the reference
screen dumps for another test in that file,
Test_diffget_diffput_linematch(), had to be changed to have all the
folds closed rather than to have the last diff block remain open.

closes: #17457

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1438: tests: Test_breakindent_list_split() fails v9.1.1438
Aliaksei Budavei [Sun, 8 Jun 2025 13:52:42 +0000 (15:52 +0200)] 
patch 9.1.1438: tests: Test_breakindent_list_split() fails

Problem:  tests: Test_breakindent_list_split() fails
          (Phạm Bình An)
Solution: Always reset "&columns" and "&lines" for GUI builds
          (Aliaksei Budavei)

Ensure that "&columns" and "&lines" are always set to their
default values before calling "SetUp()", if any, for EACH
test run by a GUI build to avoid yet-to-be-run tests from
inheriting possibly changed values (after window resizing)
and leading to broken assumptions about available estate and
occasional test failures.

fixes: #17453
closes: #17447

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1437: MS-Windows: internal compile error in uc_list() v9.1.1437
Mike Williams [Sun, 8 Jun 2025 13:41:52 +0000 (15:41 +0200)] 
patch 9.1.1437: MS-Windows: internal compile error in uc_list()

Problem:  MS-Windows: internal compile error in uc_list() with VS 17.14
          (ibear)
Solution: refactor code slightly (Mike Williams)

fixes: #17402
closes: #17464

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agoruntime(doc): fix some style issues and remove obsolete docs
Hirohito Higashi [Sat, 7 Jun 2025 16:31:42 +0000 (18:31 +0200)] 
runtime(doc): fix some style issues and remove obsolete docs

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agoruntime(vim): vimHLGroup is not highlighted correctly
Eisuke Kawashima [Sat, 7 Jun 2025 15:59:11 +0000 (17:59 +0200)] 
runtime(vim): vimHLGroup is not highlighted correctly

Problem: vimHLGroup is not highlighted in "hi def link"
          and "hi clear" commands
Solution: highlight vimHLGroup similarly to vimGroup
          (Eisuke Kawashima)

closes: #17450

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agoruntime(vim): remove trailing whitespace in Vim syntax generator
Eisuke Kawashima [Sat, 7 Jun 2025 15:55:58 +0000 (17:55 +0200)] 
runtime(vim): remove trailing whitespace in Vim syntax generator

related: #17450

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1436: GUI control code is displayed on the console on startup v9.1.1436
Hirohito Higashi [Sat, 7 Jun 2025 15:49:35 +0000 (17:49 +0200)] 
patch 9.1.1436: GUI control code is displayed on the console on startup

Problem:  GUI control code is displayed on the console on startup
Solution: check if Vim is starting up (Hirohito Higashi)

closes: #17456

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agoCI: bump xcode to 16.4
Philip H. [Sat, 7 Jun 2025 15:45:21 +0000 (17:45 +0200)] 
CI: bump xcode to 16.4

closes: #17446

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agoruntime(netrw): upstream snapshot of v181
Luca Saccarola [Sat, 7 Jun 2025 15:35:18 +0000 (17:35 +0200)] 
runtime(netrw): upstream snapshot of v181

closes: #17461

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agoruntime(typescript): remove Fixedgq() function from indent script
Phạm Bình An [Thu, 5 Jun 2025 19:21:35 +0000 (21:21 +0200)] 
runtime(typescript): remove Fixedgq() function from indent script

Problem:
1. The `Fixedgq()` function is broken (see #17412)
2. The `'formatexpr'` for Typescript is not documented, which causes
   confusion to users when they try to set `'formatprg'`, since
   `'formatexpr'` always takes precedence over `'formatprg'`. See also
   https://github.com/HerringtonDarkholme/yats.vim/issues/209
3. Typescript already has a very good and popular formatter called
   `prettier`, that can be easily integrated to Vim via `'formatprg'`
   (see #16989). I don't think there are any good reasons to reinvent a
   half-baked version in Vim.

Solution:  Remove the Fixedgq() 'formatexpr' function.

fixes: #17412
closes: #17452

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agoruntime(doc): Add missing 'wfb' (winfixbuf) tag
Doug Kearns [Thu, 5 Jun 2025 19:18:09 +0000 (21:18 +0200)] 
runtime(doc): Add missing 'wfb' (winfixbuf) tag

closes: #17455

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1435: completion: various flaws in fuzzy completion v9.1.1435
Girish Palya [Thu, 5 Jun 2025 19:04:29 +0000 (21:04 +0200)] 
patch 9.1.1435: completion: various flaws in fuzzy completion

Problem:  completion: various flaws in fuzzy completion
Solution: fix the issues (Girish Palya)

- Remove the brittle `qsort()` on `compl_match_array`.
- Add a stable, non-recursive `mergesort` for the internal doubly
  linked list of matches.
- The sort now happens directly on the internal representation (`compl_T`),
  preserving sync with external structures and making sorting stable.
- Update fuzzy match logic to enforce `max_matches` limits after
  sorting.
- Remove `trim_compl_match_array()`, which is no longer necessary.
- Fixe test failures by correctly setting `selected` index and
  maintaining match consistency.
- Introduce `mergesort_list()` in `misc2.c`, which operates generically
  over doubly linked lists.
- Remove `pum_score` and `pum_idx` variables

fixes: #17387
closes: #17430

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1434: MS-Windows: missing out-of-memory checks in os_win32.c v9.1.1434
John Marriott [Thu, 5 Jun 2025 18:49:39 +0000 (20:49 +0200)] 
patch 9.1.1434: MS-Windows: missing out-of-memory checks in os_win32.c

Problem:  MS-Windows: missing out-of-memory checks in os_win32.c
Solution: Add out-of-memory checks to os_win32.c (John Marriott)

closes: #17441

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agopatch 9.1.1433: Unnecessary :if when writing session v9.1.1433
zeertzjq [Thu, 5 Jun 2025 18:25:51 +0000 (20:25 +0200)] 
patch 9.1.1433: Unnecessary :if when writing session

Problem:  Unnecessary :if in session where both branches have the same
          effect (after 9.1.1431).
Solution: Remove the superfluous :if (zeertzjq).

closes: #17448

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
7 weeks agoruntime(vim): Update base-syntax, improve Vim9 block start pattern
Doug Kearns [Thu, 5 Jun 2025 18:23:07 +0000 (20:23 +0200)] 
runtime(vim): Update base-syntax, improve Vim9 block start pattern

The opening curly brace must be followed by whitespace, comment or
trailing bar.

closes: #17454

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(openPlugin): Add URLOpen to not expand special chars
Christian Brabandt [Wed, 4 Jun 2025 19:59:01 +0000 (21:59 +0200)] 
runtime(openPlugin): Add URLOpen to not expand special chars

closes: #17424

Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(doc): fix small errors from rev 2090405de5bb66facc29c74
Christian Brabandt [Wed, 4 Jun 2025 19:40:21 +0000 (21:40 +0200)] 
runtime(doc): fix small errors from rev 2090405de5bb66facc29c74

- update the netrw window to current version (and trim it slightly to 80
  chars)
- remove a trailing double quote

Co-authored-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1432: GTK GUI: Buffer menu does not handle unicode correctly v9.1.1432
SUN Haitao [Wed, 4 Jun 2025 19:25:31 +0000 (21:25 +0200)] 
patch 9.1.1432: GTK GUI: Buffer menu does not handle unicode correctly

Problem:  GTK GUI: Buffer menu does not handle unicode correctly
Solution: Get rid of the BMHash() function (SUN Haitao)

fixes: #17403
closes: #17405

Signed-off-by: SUN Haitao <sunhaitao@devtaste.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(doc): clarify the effect of 'smarttab'
Damien Lejay [Wed, 4 Jun 2025 19:19:18 +0000 (21:19 +0200)] 
runtime(doc): clarify the effect of 'smarttab'

closes: #17426

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1431: Hit-Enter Prompt when loading session files v9.1.1431
Miguel Barro [Wed, 4 Jun 2025 19:03:27 +0000 (21:03 +0200)] 
patch 9.1.1431: Hit-Enter Prompt when loading session files

Problem:  Hit-Enter Prompt when loading session files
Solution: use set+= for 'shortmess' to keep the existing flags
          (Miguel Barro)

closes: #17445

Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(mbsync): Add support for TLSType in syntax script
Filippo Bonazzi [Wed, 4 Jun 2025 18:13:03 +0000 (20:13 +0200)] 
runtime(mbsync): Add support for TLSType in syntax script

closes: #17438

Signed-off-by: Filippo Bonazzi <filippo.bonazzi@suse.com>
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1430: tabpanel may flicker in the GUI v9.1.1430
Hirohito Higashi [Wed, 4 Jun 2025 18:05:59 +0000 (20:05 +0200)] 
patch 9.1.1430: tabpanel may flicker in the GUI

Problem:  tabpanel may flicker in the GUI
Solution: call scroll_start() and scroll_region_reset()
          (Hirohito Higashi)

fixes: #17440
closes: #17442

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(new-tutor): update the "correct" text in tutor.tutor.json
Phạm Bình An [Tue, 3 Jun 2025 19:20:00 +0000 (21:20 +0200)] 
runtime(new-tutor): update the "correct" text in tutor.tutor.json

Change from "Document '&variable'" to the expected correct result
"TODO: Document '&variable'"

closes: #17417

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1429: dragging outside the tabpanel changes tabpagenr v9.1.1429
Hirohito Higashi [Tue, 3 Jun 2025 19:07:25 +0000 (21:07 +0200)] 
patch 9.1.1429: dragging outside the tabpanel changes tabpagenr

Problem:  dragging outside the tabpanel changes tabpagenr (char101)
Solution: set in_tab_line and in_tabpanel variables (Hirohito Higashi)

fixes: #17385
closes: #17431

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1428: completion: register completion needs cleanup v9.1.1428
glepnir [Tue, 3 Jun 2025 19:04:44 +0000 (21:04 +0200)] 
patch 9.1.1428: completion: register completion needs cleanup

Problem:  completion: register completion needs cleanup
Solution: slightly refactor get_register_completion()
          (glepnir)

closes: #17432

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1427: rendering artifacts with the tabpanel v9.1.1427
Hirohito Higashi [Tue, 3 Jun 2025 18:57:57 +0000 (20:57 +0200)] 
patch 9.1.1427: rendering artifacts with the tabpanel

Problem:  rendering artifacts with the tabpanel
          (char101)
Solution: prevent double redraw, use Columns instead of frame width
          (Hirohito Higashi)

fixes: #17429
closes: #17435

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(doc): make examples verbatim to prevent conceal/tag parsing
Yochem van Rosmalen [Tue, 3 Jun 2025 18:54:33 +0000 (20:54 +0200)] 
runtime(doc): make examples verbatim to prevent conceal/tag parsing

closes: #17437

Signed-off-by: Yochem van Rosmalen <git@yochem.nl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(doc): clarify the effect of exclusive single char selections
Christian Brabandt [Mon, 2 Jun 2025 17:56:57 +0000 (19:56 +0200)] 
runtime(doc): clarify the effect of exclusive single char selections

closes: #17410

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1426: completion: register contents not completed v9.1.1426
glepnir [Mon, 2 Jun 2025 17:45:41 +0000 (19:45 +0200)] 
patch 9.1.1426: completion: register contents not completed

Problem:  CTRL-X CTRL-R only completes individual words from registers,
          making it difficult to insert complete register content.
Solution: Add consecutive CTRL-X CTRL-R support - first press completes
          words, second press completes full register lines, similar to
          CTRL-X CTRL-L and CTRL-X CTRL-P behavior (glepnir).

closes: #17395

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(vim): Update base-syntax, bug fixes
Doug Kearns [Mon, 2 Jun 2025 17:31:10 +0000 (19:31 +0200)] 
runtime(vim): Update base-syntax, bug fixes

- Contain :profdel arguments.
- Fix string highlighting immediately after lambda -> operators.

Reported by Aliaksei Budavei.

closes: #17427

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1425: tabpanel: there are still some problems with the tabpanel v9.1.1425
Hirohito Higashi [Sun, 1 Jun 2025 18:22:55 +0000 (20:22 +0200)] 
patch 9.1.1425: tabpanel: there are still some problems with the tabpanel

Problem:  tabpanel: there are still some problems with the tabpanel with
          column handling
Solution: fix the problems and refactor Tabpanel feature (Hirohito
          Higashi).

fixes: #17423
fixes: #17332
closes: #17336

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1424: PMenu selection broken with multi-line selection and limits v9.1.1424
Girish Palya [Sun, 1 Jun 2025 18:11:59 +0000 (20:11 +0200)] 
patch 9.1.1424: PMenu selection broken with multi-line selection and limits

Problem:  PMenu selection broken with multi-line selection and limits
          (Maxim Kim)
Solution: update completion match index when limiting the completion
          sources (Girish Palya)

fixes: #17394
closes: #17401

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1423: :tag command not working correctly using Vim9 Script v9.1.1423
Christian Brabandt [Sun, 1 Jun 2025 17:47:03 +0000 (19:47 +0200)] 
patch 9.1.1423: :tag command not working correctly using Vim9 Script

Problem:  :tag command not working correctly using Vim9 Script
Solution: inject a ':' before the numeric address, to make the command
          valid in Vim9 context

fixes: #17415
closes: #17418

Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1422: scheduling of complete function can be improved v9.1.1422
Girish Palya [Sun, 1 Jun 2025 17:40:00 +0000 (19:40 +0200)] 
patch 9.1.1422: scheduling of complete function can be improved

Problem:  scheduling of complete function can be improved
Solution: call user completion functions earlier when just determining
          the insertion column (Girish Palya)

This change improves the scheduling behavior of async user-defined
completion functions (such as `F{func}`, `F`, or `'o'` values in the
`'complete'` option), particularly benefiting LSP clients.

Currently, these user functions are invoked twice:

1. First with `findstart = 1` to determine the completion start
   position.
2. Then with `findstart = 0` to retrieve the actual matches.

Previously, both calls were executed back-to-back. With this change, the
first call (`findstart = 1`) is performed earlier—before any matches are
gathered from other sources.

This adjustment gives event-driven completion sources (e.g., LSP
clients) more time to send their requests while Vim concurrently
collects matches from other sources like the current buffer.

Not sure about the real-world performance gains, but this approach
should, in theory, improve responsiveness and reduce latency for
asynchronous completions.

To test, try using yegappan LSP client:

```vim
set cpt+=o^10
autocmd VimEnter * g:LspOptionsSet({ autoComplete: false, omniComplete: true })
```

If you prefer to use 'native' auto-completion (without plugins), try the
following configuration:

```vim
set cot=menuone,popup,noselect,nearest
autocmd TextChangedI * InsComplete()
def InsComplete()
  if getcharstr(1) == '' && getline('.')->strpart(0, col('.') - 1) =~ '\k$'
    SkipTextChangedI()
    feedkeys("\<c-n>", "n")
  endif
enddef
inoremap <silent> <c-e> <c-r>=<SID>SkipTextChangedI()<cr><c-e>
inoremap <silent> <c-y> <c-r>=<SID>SkipTextChangedI()<cr><c-y>
def SkipTextChangedI(): string
  set eventignore+=TextChangedI
  timer_start(1, (_) => {
    set eventignore-=TextChangedI
  })
  return ''
enddef
inoremap <silent><expr> <tab> pumvisible() ? "\<c-n>" : "\<tab>"
inoremap <silent><expr> <s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"
```

closes: #17396

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(doc): make 'shiftwidth' setting more precise
Damien Lejay [Sun, 1 Jun 2025 17:10:36 +0000 (19:10 +0200)] 
runtime(doc): make 'shiftwidth' setting more precise

closes: #17414

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agopatch 9.1.1421: tests: need a test for the new-style tutor.tutor v9.1.1421
Phạm Bình An [Sun, 1 Jun 2025 16:58:09 +0000 (18:58 +0200)] 
patch 9.1.1421: tests: need a test for the new-style tutor.tutor

Problem:  tests: need a test for the new-style tutor.tutor, patch
          9.1.1384 broke the expected positions for the signs
Solution: Update all number keys in tutor.tutor.json to match the
          correct line numbers in tutor.tutor, replace tabs by spaces,
          add a screen-dump test to verify it does not regress
          (Pham Bình An)

closes: #17416

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(java): Match annotation- and interface-type names of "java.lang"
Aliaksei Budavei [Sun, 1 Jun 2025 16:29:37 +0000 (18:29 +0200)] 
runtime(java): Match annotation- and interface-type names of "java.lang"

Complement the documented support for the recognition of all
public types of the "java.lang" package (":help java.vim").
(The original syntax item generator may have, inadvertently,
contributed via suppressing "NullPointerException"s to not
having annotation and interface types qualify in general.)

Also, re-link usage instructions for the alternative syntax
item generator to a rolling "master"'s version.

closes: #17419

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
8 weeks agoruntime(vim): Update base-syntax, improve :profile highlighting
Doug Kearns [Sun, 1 Jun 2025 16:26:39 +0000 (18:26 +0200)] 
runtime(vim): Update base-syntax, improve :profile highlighting

Match full :profile and :profdel commands.

closes: #17420

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(vim): Update base-syntax, improve :mark and :substitute highlighting
Doug Kearns [Sat, 31 May 2025 15:52:48 +0000 (17:52 +0200)] 
runtime(vim): Update base-syntax, improve :mark and :substitute highlighting

- Match full :mark and :k commands.
- Match 2 and 3 letter :s repeat commands.
- Match :s [count] argument.

closes: #17408

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1420: tests: could need some more tests for shebang lines v9.1.1420
Eisuke Kawashima [Sat, 31 May 2025 10:30:59 +0000 (12:30 +0200)] 
patch 9.1.1420: tests: could need some more tests for shebang lines

Problem:  tests: could need some more tests for shebang lines
Solution: add more shebang patterns to test_filetype.vim
          (Eisuke Kawashima)

closes: #17409

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(java): Reference a modern syntax item generator for type names
Aliaksei Budavei [Sat, 31 May 2025 10:25:15 +0000 (12:25 +0200)] 
runtime(java): Reference a modern syntax item generator for type names

And generalise the sourcing of "javaid.vim" for Java
buffers.

Resolves zzzyxwvut/java-vim#10.
closes: #17411

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1419: It is difficult to ignore all but some events v9.1.1419
Luuk van Baal [Sat, 31 May 2025 10:10:31 +0000 (12:10 +0200)] 
patch 9.1.1419: It is difficult to ignore all but some events

Problem:  It is difficult to ignore all but some events.
Solution: Add support for a "-" prefix syntax in '(win)eventignore' that
          subtracts an event from the ignored set if present
          (Luuk van Baal).

closes: #17392

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): fix typo in tag for helptoc package
Christian Brabandt [Sat, 31 May 2025 10:06:49 +0000 (12:06 +0200)] 
runtime(doc): fix typo in tag for helptoc package

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): CI fails with trailing whitespace error in usr_30.txt
Christian Brabandt [Fri, 30 May 2025 18:14:16 +0000 (20:14 +0200)] 
runtime(doc): CI fails with trailing whitespace error in usr_30.txt

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): clarify behaviour of set maxcombine=0
Christian Brabandt [Fri, 30 May 2025 15:43:42 +0000 (17:43 +0200)] 
runtime(doc): clarify behaviour of set maxcombine=0

related: #17400

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): update todo list
Christian Brabandt [Fri, 30 May 2025 15:38:30 +0000 (17:38 +0200)] 
runtime(doc): update todo list

It is now possible to use omni-completion by adding the "o" flag to
'complete'

fixes: #17393

Co-authored-by: Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): clarify tabstop settings and guidance
Damien Lejay [Fri, 30 May 2025 15:36:37 +0000 (17:36 +0200)] 
runtime(doc): clarify tabstop settings and guidance

closes: #17381

Signed-off-by: Damien Lejay <damien@lejay.be>
Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(vim): Update base-syntax, improve :set highlighting
Doug Kearns [Fri, 30 May 2025 14:17:30 +0000 (16:17 +0200)] 
runtime(vim): Update base-syntax, improve :set highlighting

- Match comments and trailing bar after :set without args.
- Match the <...> form for key code options.
- Remove orphaned vim_ex_python[3x]* dump files (Aliaksei Budavei).

closes: #17397

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): Fix typos and language in documentation for tabpanel.
Christ van Willegen [Fri, 30 May 2025 14:05:58 +0000 (16:05 +0200)] 
runtime(doc): Fix typos and language in documentation for tabpanel.

closes: #17407

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1418: configures GUI auto detection favors GTK2 v9.1.1418
Drew Vogel [Wed, 28 May 2025 19:13:52 +0000 (21:13 +0200)] 
patch 9.1.1418: configures GUI auto detection favors GTK2

Problem:  configures GUI auto detection favors GTK2
Solution: make configure favor GTK3 over GTK2 for the GUI
          when auto detecting the gui toolkit (Drew Vogel).

Prior to these changes if the dev packages for both GTK2 and GTK3 were
installed, the `--enable-gui=auto` would used GTK2. After these changes
it will use GTK3. Users can still use `--enable-gui=gtk2` to
specifically select GTK2.

In addition to the prioritization change, this also brings some cleanups
to the GTK autoconf code:

* The `AM_PATH_GTK` macro had an unused third argument that has been
  removed.
* The `AM_PATH_GTK` macro checked the `SKIP_GTK2` & `SKIP_GTK3`
  variables but the code that decided whether to call it also checked
  those. Now just the calling code does so.
* The `AM_PATH_GTK` macro set a default minimum version based on
  `SKIP_GTK2` and `SKIP_GTK3` but the calling code was also expected to
  pass a version. Now the calling code _must_ pass a version.
* The GTK test program previous used `gtk_(major|minor|micro)_version`
  as all of: a C variable name, a C macro provided only by GTK2, and an
  autoconf variable name. It also needlessly parsed a `x.y.z` version
  string when the same string was already parsed by autoconf + sed. Now
  the parsed values are used directly in the test program.
* The GTK test program previous created a test program `conf.gtktest`
  which was cleaned up by the autoconf script. This appeared to be a
  crude way to debug whether an erroring configure run had actually run
  the test program. Instead the autoconf script now outputs more messaging
  and the user can check `config.log` to determine the status of the
  configure script.

I'm not an autoconf expert and I don't have access to some of the older
systems we try to support with gvim. So I would very much appreciate if
anyone could run this on their systems to ensure it doesn't misbehave.

While my motivation here is mainly to further establish GTK3 as the
primary GUI mode, this should at least partially address the concern
described in #15437.

Here are a few test runs with both GTK 2 and GTK 3 installed:

```
    --with-features=huge \
    --enable-gui \
    --enable-gtk3-check=no \
    --enable-gtktest \
```

```
checking --enable-gui argument... yes/auto - automatic GUI support
checking whether or not to look for GTK+ 2... yes
checking whether or not to look for GNOME... no
checking whether or not to look for GTK+ 3... no
checking whether or not to look for Motif... yes
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-2.0... found
checking for GTK - version >= 2.2.0... yes; found version 2.24.33
checking ability to compile GTK test program... yes
```

```
    --with-features=huge \
    --enable-gui \
    --enable-gtk2-check=no \
    --enable-gtktest \
```

```
checking --enable-gui argument... yes/auto - automatic GUI support
checking whether or not to look for GTK+ 2... no
checking whether or not to look for GTK+ 3... yes
checking whether or not to look for Motif... yes
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-3.0... found
checking for GTK - version >= 3.0.0... yes; found version 3.24.49
checking ability to compile GTK test program... yes
```

```
    --with-features=huge \
```

```
checking --enable-gui argument... yes/auto - automatic GUI support
checking whether or not to look for GTK+ 2... yes
checking whether or not to look for GNOME... no
checking whether or not to look for GTK+ 3... yes
checking whether or not to look for Motif... yes
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-3.0... found
checking for GTK - version >= 3.0.0... yes; found version 3.24.49
checking ability to compile GTK test program... yes
```

```
    --with-features=huge \
    --disable-gtktest \
```

```
checking --enable-gui argument... yes/auto - automatic GUI support
checking whether or not to look for GTK+ 2... yes
checking whether or not to look for GNOME... no
checking whether or not to look for GTK+ 3... yes
checking whether or not to look for Motif... yes
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test disabled
checking for pkg-config gtk+-3.0... found
checking for GTK - version >= 3.0.0... yes; found version 3.24.49
```

```
    --with-features=huge \
    --enable-gui=gtk2 \
```

```
checking --enable-gui argument... GTK+ 2.x GUI support
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-2.0... found
checking for GTK - version >= 2.2.0... yes; found version 2.24.33
checking ability to compile GTK test program... yes
```

```
    --with-features=huge \
    --enable-gui=gtk3 \
```

```
checking --enable-gui argument... GTK+ 3.x GUI support
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-3.0... found
checking for GTK - version >= 3.0.0... yes; found version 3.24.49
checking ability to compile GTK test program... yes
```

And here is a similar run with the GTK 3 dev package removed:

```
    --with-features=huge \
    --enable-gui=gtk3 \
    --enable-fail-if-missing \
```

```
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-3.0... no; consider installing your distro
GTK -dev package
configure: error: pkg-config could not find gtk+-3.0
```

closes: #17369

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1417: missing info about register completion in complete_info() v9.1.1417
glepnir [Wed, 28 May 2025 18:39:34 +0000 (20:39 +0200)] 
patch 9.1.1417: missing info about register completion in complete_info()

Problem:  missing info about register completion in complete_info()
          (after v9.1.1408)
Solution: update documentation and mention that register is used as
          source, add a test (glepnir)

closes: #17389

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1416: completion limits not respected for fuzzy completions v9.1.1416
Girish Palya [Wed, 28 May 2025 18:28:21 +0000 (20:28 +0200)] 
patch 9.1.1416: completion limits not respected for fuzzy completions

Problem:  completion limits not respected when using fuzzy completion
          (Maxim Kim)
Solution: trim completion array (Girish Palya)

fixes: #17379
closes: #17386

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): Correct allowed flags after :substitute repeat
Christian Brabandt [Wed, 28 May 2025 18:23:29 +0000 (20:23 +0200)] 
runtime(doc): Correct allowed flags after :substitute repeat

closes: #17391

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1415: potential use-after free when there is an error in 'tabpanel' v9.1.1415
Christian Brabandt [Tue, 27 May 2025 18:49:34 +0000 (20:49 +0200)] 
patch 9.1.1415: potential use-after free when there is an error in 'tabpanel'

Problem:  potential use-after free when there is an error in 'tabpanel'
          option (@char101, after v9.1.1391)
Solution: check if p_tpl has been set to null before accessing it again.

While at it slightly change starts_with_percent_and_bang() and use the
existing opt_name and opt_scope variables.

fixes: #17364
closes: #17388

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): trailing whitespace in options.txt, delete it.
Christian Brabandt [Mon, 26 May 2025 19:18:19 +0000 (21:18 +0200)] 
runtime(doc): trailing whitespace in options.txt, delete it.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agotranslation(hy): renamed am.po -> hy.po for armenian lang translations
Gagik Hakobyan [Mon, 26 May 2025 19:11:51 +0000 (21:11 +0200)] 
translation(hy): renamed am.po -> hy.po for armenian lang translations

According to ISO-639, the correct 2 letter language code is HY not AM,
so let's rename am.po.

Also, add hy.po to the CHECKFILES Make target and convert the file to
Unix lineformat.

closes: #17380

Signed-off-by: Gagik Hakobyan <hakgagik@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): Correct allowed characters at :help 'filetype'
Doug Kearns [Mon, 26 May 2025 18:32:35 +0000 (20:32 +0200)] 
runtime(doc): Correct allowed characters at :help 'filetype'

closes: #17366

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1414: MS-Windows: compile warnings in os_win32.c v9.1.1414
John Marriott [Mon, 26 May 2025 18:25:38 +0000 (20:25 +0200)] 
patch 9.1.1414: MS-Windows: compile warnings in os_win32.c

Problem:  MS-Windows: compile warnings in os_win32.c
Solution: update function declarations, correctly access param arg in
          set_flag() using (sig_atomic_t) cast (John Marriott)

closes: #17368

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1413: spurious CursorHold triggered in GUI on startup v9.1.1413
Gary Johnson [Mon, 26 May 2025 18:10:25 +0000 (20:10 +0200)] 
patch 9.1.1413: spurious CursorHold triggered in GUI on startup

Problem:  spurious CursorHold triggered in GUI on startup
Solution: init global did_cursorhold flag to true
          (Gary Johnson)

When Vim is started in GUI mode, the CursorHold autocommand event is
triggered 'updatetime' milliseconds later, even when the user has not
pressed a key.  This is different from the behavior of Vim in terminal
mode, which does not trigger a CursorHold autocommand event at startup,
and contradicts the description of the CursorHold event in ":help
CursorHold", which states that the event is "[n]ot triggered until the
user has pressed a key".

The fix is to change the initial value of did_cursorhold from FALSE to
TRUE.  While it is true that the CursorDone event has not been done yet
at startup, it should appear to have been done until the user presses
a key.

fixes #17350
closes: #17382

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1412: tests: Test_tabpanel_tabonly() fails on larger screens v9.1.1412
Christian Brabandt [Mon, 26 May 2025 17:54:07 +0000 (19:54 +0200)] 
patch 9.1.1412: tests: Test_tabpanel_tabonly() fails on larger screens

Problem:  tests: Test_tabpanel_tabonly() fails on larger screens
Solution: re-generate screendump file for 78 column large terminal

closes: #17376

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1411: crash when calling non-existing function for tabpanel v9.1.1411
Christian Brabandt [Mon, 26 May 2025 17:51:03 +0000 (19:51 +0200)] 
patch 9.1.1411: crash when calling non-existing function for tabpanel

Problem:  crash when calling non-existing function for tabpanel (Yamagi,
          after v9.1.1391)
Solution: check if there was an error and if there was, set tabpanel
          option to empty to prevent showing errors on every redraw

fixes: #17364
closes: #17375
closes: #17371

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1410: out-of-bounds access with 'completefunc' v9.1.1410
Girish Palya [Mon, 26 May 2025 17:41:59 +0000 (19:41 +0200)] 
patch 9.1.1410: out-of-bounds access with 'completefunc'

Problem:  out-of-bounds access with 'completefunc' (csetc)
Solution: check if it is safe to advance cpt_sources_index
          (Girish Palya)

fixes: #17363
closes: #17374

Co-authored-by: @csetc
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1409: using f-flag in 'complete' conflicts with Neovim v9.1.1409
Girish Palya [Mon, 26 May 2025 17:04:25 +0000 (19:04 +0200)] 
patch 9.1.1409: using f-flag in 'complete' conflicts with Neovim

Problem:  using f-flag in 'complete' conflicts with Neovims filename
          completion (glepnir, after v9.1.1301).
Solution: use upper-case "F" flag for completion functions
          (Girish Palya).

fixes: #17347
closes: #17378

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1408: not easily possible to complete from register content v9.1.1408
glepnir [Mon, 26 May 2025 16:23:27 +0000 (18:23 +0200)] 
patch 9.1.1408: not easily possible to complete from register content

Problem:  not easily possible to complete from register content
Solution: add register-completion submode using i_CTRL-X_CTRL-R
          (glepnir)

closes: #17354

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): clarify license conditions for distributed runtime files
Christian Brabandt [Sun, 25 May 2025 15:07:51 +0000 (17:07 +0200)] 
runtime(doc):  clarify license conditions for distributed runtime files

related: #17372

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime: Add license information for HCL and Terraform runtime files
Gregory Anders [Sun, 25 May 2025 15:01:45 +0000 (17:01 +0200)] 
runtime: Add license information for HCL and Terraform runtime files

fixes: #17372
closes: #17377

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1407: Can't use getpos('v') in OptionSet when using setbufvar() v9.1.1407
zeertzjq [Sun, 25 May 2025 14:59:50 +0000 (16:59 +0200)] 
patch 9.1.1407: Can't use getpos('v') in OptionSet when using setbufvar()

Problem:  Can't use getpos('v') in OptionSet when using setbufvar().
Solution: Don't reset Visual selection when switching to the same
          buffer (zeertzjq).

closes: #17373

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1406: crash when importing invalid tuple v9.1.1406
Yegappan Lakshmanan [Fri, 23 May 2025 15:39:44 +0000 (17:39 +0200)] 
patch 9.1.1406: crash when importing invalid tuple

Problem:  crash when importing invalid tuple
          (Yang LUO, Yanju Chen)
Solution: set type to VAR_UNKNOWN, so that it isn't freed
          (Yegappan Lakshmanan)

closes: #17362

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1405: tests: no test for mapping with special keys in session file v9.1.1405
zeertzjq [Fri, 23 May 2025 15:16:17 +0000 (17:16 +0200)] 
patch 9.1.1405: tests: no test for mapping with special keys in session file

Problem:  tests: no test for mapping with special keys in session file.
Solution: Add a special keys to an existing test.  Also test with UTF-8
          characters containing 0x80 or 0x9b bytes (zeertzjq).

closes: #17360

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1404: wrong link to Chapter 2 in new-tutor v9.1.1404
Phạm Bình An [Thu, 22 May 2025 20:53:28 +0000 (22:53 +0200)] 
patch 9.1.1404: wrong link to Chapter 2 in new-tutor

Problem:  wrong link to Chapter 2 in vim-01-beginner.tutor
Solution: Fix the link to Chapter 2, add test for links in tutor files
          (Phạm Bình An)

In order to write the test, I expose the function `s:GlobTutorials` as
`tutor#GlobTutorials` and make it also accept a `locale` argument.

closes: #17356

Signed-off-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(vim): Update base-syntax, fix missing luaParenError error
Doug Kearns [Thu, 22 May 2025 20:48:11 +0000 (22:48 +0200)] 
runtime(vim): Update base-syntax, fix missing luaParenError error

We shouldn't assume that the luaParenError syntax group is present in
the, possibly custom, included file or that it hasn't already been
removed.  However, issue #11277 has been fixed so it no longer needs to
be cleared.

Fixes comment https://github.com/vim/vim/pull/15375#issuecomment-2899791944

related: #15375
closes: #17357

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1403: expansion of 'tabpanelopt' value adds wrong values v9.1.1403
Hirohito Higashi [Thu, 22 May 2025 20:41:05 +0000 (22:41 +0200)] 
patch 9.1.1403: expansion of 'tabpanelopt' value adds wrong values

Problem:  expansion of 'tabpanelopt' value adds wrong values
          (Shane-XB-Qian, after v9.1.1391)
Solution: update tabpanelopt expansion function and expand only valid
          values (Hirohito Higashi)

related: #17263
closes: #17359

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1402: multi-byte mappings not properly stored in session file v9.1.1402
GuyBrush [Thu, 22 May 2025 20:19:25 +0000 (22:19 +0200)] 
patch 9.1.1402: multi-byte mappings not properly stored in session file

Problem:  multi-byte mappings not properly stored in session file
Solution: unescape the mapping before writing out the mapping, prefer
          single-byte mapping name if possible (Miguel Barro)

closes: #17355

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(syntax-tests): rename kornshell syntax tests and regenerate 00 dumps
Christian Brabandt [Thu, 22 May 2025 19:55:58 +0000 (21:55 +0200)] 
runtime(syntax-tests): rename kornshell syntax tests and regenerate 00 dumps

related: #17348

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(sh): Fix various syntax highlighting problems in ksh93 scripts
Johnothan King [Wed, 21 May 2025 19:21:14 +0000 (21:21 +0200)] 
runtime(sh): Fix various syntax highlighting problems in ksh93 scripts

- Fixed syntax highlighting for ksh93 namespace variables starting
  with '${.'
- Added support for the alarm, eloop, fds, mkservice, pids, poll and
  sha2sum builtins (which are indeed ksh93 builtins, albeit whether or
  not they are available depends on the ksh release and the compiled
  SHOPT options).
- Added support for the many Unix commands provided by ksh93's libcmd
  as builtin commands (since these are general commands, scripts for
  other shells like bash will also highlight these).
  - The dumps for the sh_0{2,5,6,8,9}.sh were recreated due to this
    change affecting commands those scripts call (e.g. 'wc').
- Enabled ${parameter/pattern/string} and friends for ksh syntax.
- Enabled case modification for ksh. See also:
  https://github.com/ksh93/ksh/commit/c1762e03
- Enabled ;;& support for ksh. See also:
  https://github.com/ksh93/ksh/commit/fc89d20a
- Added many special ksh variables using 93u+m's data/variables.c
  as a reference.

If vim can't figure out which ksh release is in play using e.g.
the hashbang path, in such a case a generic default that enables
everything and the kitchen sink will be used. Otherwise, features will
be disabled if it's absolutely known a certain feature will not be
present. Examples:
   - ERRNO is ksh88 specific, so that is locked to ksh88.
   - Only 93u+m (assumed for generic) has SRANDOM, and only 93u+m
     and 93v- have case modification support.
   - 93u+ and 93v- have VPATH and CSWIDTH variables (the latter
     is vestigal, but still present in the hardcoded variable table).
   - 93v- and ksh2020 have (buggy and near unusable) implementations
     of compgen and complete.
   - Only mksh provides function substitutions, i.e. ${|command;}.

This took the better part of my day to implement. It seems to work well
enough though. (Also had to regenerate the dumps again while testing
it, as now there are dup scripts with mere hashbang differences, used
solely for testing syntax highlighting differences.)

closes: #17348

Signed-off-by: Johnothan King <johnothanking@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1401: list not materialized in prop_list() v9.1.1401
Christian Brabandt [Wed, 21 May 2025 19:01:40 +0000 (21:01 +0200)] 
patch 9.1.1401: list not materialized in prop_list()

Problem:  list not materialized in prop_list()
          (Nickwiz)
Solution: materialize list before accessing it

fixes: #17298
closes: #17349

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1400: [security]: use-after-free when evaluating tuple fails v9.1.1400
Yegappan Lakshmanan [Wed, 21 May 2025 18:52:44 +0000 (20:52 +0200)] 
patch 9.1.1400: [security]: use-after-free when evaluating tuple fails

Problem:  [security]: use-after-free when evaluating tuple fails
Solution: return early in case of an error (Yegappan Lakshmanan)

closes: #17351

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1399: tests: test_codestyle fails for auto-generated files v9.1.1399
Christian Brabandt [Wed, 21 May 2025 18:50:11 +0000 (20:50 +0200)] 
patch 9.1.1399: tests: test_codestyle fails for auto-generated files

Problem:  tests: test_codestyle fails for auto-generated files.
          While those files are already ignored in Test_source_Files(),
          the newly added Test_indent_of_source_files() does not filter
          those out and causes test failures on appveyor.
Solution: factor out the generation of all c files into a common function
          and filter out auto-generated files if_ole.h, iid_ole.c and
          dlldata.c

closes: #17352

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(tar): preserve pwd when reading and writing tar files
Michele Sorcinelli [Mon, 19 May 2025 17:45:32 +0000 (19:45 +0200)] 
runtime(tar): preserve pwd when reading and writing tar files

While at it, use `:lcd` to temporarily set the window local directory
instead of `:cd` for the global working directory.

fixes: #17334
closes: #17339

Signed-off-by: Michele Sorcinelli <michelesr@autistici.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): remove outdated Contribution section in pi_tutor
Phạm Bình An [Mon, 19 May 2025 17:34:44 +0000 (19:34 +0200)] 
runtime(doc): remove outdated Contribution section in pi_tutor

Problem:  The Github repo link in the Contribution section has been
          archived for 5 years. So people who want to contribute to the
          tutor plugin should just send PR to Vim repo, similar to most
          other Vim features, so there is no need for a Contribution
          section in the plugin doc.

Solution: Replace it with an Original Author note at the beginning of
          the help document.

closes: #17341

Signed-off-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(muttrc): fix mangled keywords in syntax script
Markus Heidelberg [Mon, 19 May 2025 17:31:23 +0000 (19:31 +0200)] 
runtime(muttrc): fix mangled keywords in syntax script

Regression introduced in commit 10f23e10a9 ("Update syntax/muttrc.vim to
latest mutt (#12797)", 2023-08-15)

Affected keywords:
  invresume_draft_files
  invresume_edited_draft_files
  mailcap_path
  mark_macro_prefix

closes: #17344

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(vim): Update base-syntax, improve :import highlighting
Doug Kearns [Sun, 18 May 2025 18:37:34 +0000 (20:37 +0200)] 
runtime(vim): Update base-syntax, improve :import highlighting

- Match "autoload" as a keyword in :import commands.
- Match an expression argument for the filename.

closes: #15375

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1398: completion: trunc does not follow Pmenu highlighting attributes v9.1.1398
glepnir [Sun, 18 May 2025 18:14:53 +0000 (20:14 +0200)] 
patch 9.1.1398: completion: trunc does not follow Pmenu highlighting attributes

Problem:  When items are combined with user-defined highlight attributes
          (e.g., strikethrough), trunc inherits these attributes, making
          the text difficult to read.
Solution: trunc now uses the original Pmenu and PmenuSel highlight
          attributes (glepnir)

closes: #17340

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(vim): Update base-syntax, improve script-interface command highlighting
Doug Kearns [Sat, 17 May 2025 14:29:13 +0000 (16:29 +0200)] 
runtime(vim): Update base-syntax, improve script-interface command highlighting

- Normalise interface heredoc highlighting with that used for
  :let-heredocs.
- Remove interface feature testing.  The Lua and Python interface
  command scripts are now highlighted by default.  Loading all syntax
  files incurs an undesirable load-time burden so highlighting of the
  less popular MzScheme, Perl, Ruby and Tcl interfaces is disabled by
  default.  g:vimsyn_embed can still be used to customise the supported
  interfaces.
- Always highlight interface ex-commands as valid commands, even when
  the corresponding command-script highlighting is disabled.
- Highlight simple command-script statements as well as heredocs.
- Remove error highlighting of heredoc and statement command-script
  regions when an interface is disabled.  These are now highlighted as
  plain text.
- Allow indented heredoc end tokens when "trim" is specified.
- Match interface heredocs in :def functions.
- Fix runaway vimEmbedError regions.  These regions have been removed.
- Use python2 syntax for :python, and :pythonx when 'pyxversion' is
  appropriately set.

closes: #15522

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1397: tabpanel not correctly updated on :tabonly v9.1.1397
Naruhiko Nishino [Sat, 17 May 2025 14:19:24 +0000 (16:19 +0200)] 
patch 9.1.1397: tabpanel not correctly updated on :tabonly

Problem:  tabpanel not correctly updated on :tabonly
          (Maxim Kim)
Solution: force a redraw, take 'equalalways' into account
          (Naruhiko Nishino)

related: https://github.com/vim/vim/pull/17330#issuecomment-2888146370
closes: #17337

Signed-off-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1396: 'errorformat' is a global option v9.1.1396
glepnir [Fri, 16 May 2025 17:49:23 +0000 (19:49 +0200)] 
patch 9.1.1396: 'errorformat' is a global option

Problem:  The 'grepformat' option is global option, but it would be
          useful to have it buffer-local, similar to 'errorformat' and
          other quickfix related options (Dani Dickstein)
Solution: Add the necessary code to support global-local 'grepformat',
          allowing different buffers to parse different grep output
          formats (glepnir)

fixes: #17316
closes: #17315

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1395: search_stat not reset when pattern differs in case v9.1.1395
Christian Brabandt [Fri, 16 May 2025 17:38:50 +0000 (19:38 +0200)] 
patch 9.1.1395: search_stat not reset when pattern differs in case

Problem:  search_stat not reset when pattern differs in case
          (tahzibijafar)
Solution: use STRNCMP instead of MB_STRNICMP macro

There was a long standing todo comment, that using MB_STRNICMP is wrong.
So let's change it to STRNCMP() instead. Even if it not handle
multi-byte characters correctly, then Vim will rather recompute the
search stat, instead of re-using the old (and possibly wrong) value.

fixes: #17312
closes: #17314

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agopatch 9.1.1394: tabpanel not correctly redrawn on tabonly v9.1.1394
Hirohito Higashi [Fri, 16 May 2025 17:34:34 +0000 (19:34 +0200)] 
patch 9.1.1394: tabpanel not correctly redrawn on tabonly

Problem:  tabpanel not correctly redrawn on tabonly
          (Maxim Kim, after v9.1.1391)
Solution: force redraw of the tabpanel, tweak style
          (Hirohito Higashi)

fixes: #17322
closes: #17330

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(doc): fix typo in description of :redrawtabpanel
Christian Brabandt [Thu, 15 May 2025 18:16:04 +0000 (20:16 +0200)] 
runtime(doc): fix typo in description of :redrawtabpanel

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 months agoruntime(gleam): add @Spell clusters to syntax script
Kat [Thu, 15 May 2025 18:10:48 +0000 (20:10 +0200)] 
runtime(gleam): add @Spell clusters to syntax script

closes: #17324

Signed-off-by: Kat <65649991+00-kat@users.noreply.github.com>
Signed-off-by: Kirill Morozov <kirill@robotix.pro>
Signed-off-by: Christian Brabandt <cb@256bit.org>