]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
3 weeks agopatch 9.1.1515: Coverity complains about potential unterminated strings v9.1.1515
glepnir [Sun, 6 Jul 2025 09:02:51 +0000 (11:02 +0200)] 
patch 9.1.1515: Coverity complains about potential unterminated strings

Problem:    memcpy() in ExpandRTDir_int() may create unterminated strings
Solution:   Use vim_snprintf() to construct complete paths safely
            (glepnir).

related: neovim/neovim#34795
closes: #17669

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.1.1514: Coverity complains about the use of tmpfile() v9.1.1514
Christian Brabandt [Sun, 6 Jul 2025 08:39:59 +0000 (10:39 +0200)] 
patch 9.1.1514: Coverity complains about the use of tmpfile()

Problem:  coverity complains about the use of tmpfile()
Solution: use vim_tempname() instead to create anonym file

related: #17097
closes: #17674

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.1.1513: resizing Vim window causes unexpected internal window width v9.1.1513
Hirohito Higashi [Sun, 6 Jul 2025 08:34:48 +0000 (10:34 +0200)] 
patch 9.1.1513: resizing Vim window causes unexpected internal window width

Problem:  resizing Vim window causes unexpected internal window width
          (chdiza, after v9.1.1465)
Solution: move the column calculation around (Hirohito Higashi)

fixes: #17657
fixes: #17595
closes: #17668

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agoruntime(doc): add a section for options influencing search
Christian Brabandt [Sun, 6 Jul 2025 08:24:41 +0000 (10:24 +0200)] 
runtime(doc): add a section for options influencing search

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agotests: fix typo in comment (after v9.1.1511)
zeertzjq [Sat, 5 Jul 2025 15:02:04 +0000 (17:02 +0200)] 
tests: fix typo in comment (after v9.1.1511)

related: #17660

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agoruntime(vim): Update base-syntax, match :filetype in functions
Doug Kearns [Sat, 5 Jul 2025 14:48:02 +0000 (16:48 +0200)] 
runtime(vim): Update base-syntax, match :filetype in functions

closes: #17671

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.1.1512: completion: can only complete from keyword characters v9.1.1512
Girish Palya [Sat, 5 Jul 2025 14:11:44 +0000 (16:11 +0200)] 
patch 9.1.1512: completion: can only complete from keyword characters

Problem:  completion: can only complete from keyword characters
Solution: remove this restriction, allow completion functions when
          called from i_CTRL-N/i_CTRL-P to be triggered from non-keyword
          characters (Girish Palya)

Previously, functions specified in the `'complete'` option were
restricted to starting completion only from keyword characters (as
introduced in PR 17065). This change removes that restriction.

With this change, user-defined functions (e.g., `omnifunc`, `userfunc`)
used in `'complete'` can now initiate completion even when triggered
from non-keyword characters. This makes it easier to reuse existing
functions alongside other sources without having to consider whether the
cursor is on a keyword or non-keyword character, or worry about where
the replacement should begin (i.e., the `findstart=1` return value).

The logic for both the “collection” and “filtering” phases now fully
respects each source’s specified start column. This also extends to
fuzzy matching, making completions more predictable.

Internally, this builds on previously merged infrastructure that tracks
per-source metadata. This PR focuses on applying that metadata to
compute the leader string and insertion text appropriately for each
match.

Also, a memory corruption has been fixed in prepare_cpt_compl_funcs().

closes: #17651

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.1.1511: tests: two edit tests change v:testing from 1 to 0 v9.1.1511
zeertzjq [Sat, 5 Jul 2025 13:39:56 +0000 (15:39 +0200)] 
patch 9.1.1511: tests: two edit tests change v:testing from 1 to 0

Problem:  tests: two edit tests change v:testing from 1 to 0.
Solution: Don't change v:testing in these two tests, since it's already
          set to 1 in runtest.vim (zeertzjq).

closes: #17660

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.1.1510: Search completion may use invalid memory v9.1.1510
zeertzjq [Sat, 5 Jul 2025 13:37:17 +0000 (15:37 +0200)] 
patch 9.1.1510: Search completion may use invalid memory

Problem:  Search completion may use invalid memory (after 9.1.1490).
Solution: Don't get two line pointers at the same time (zeertzjq).

closes: #17661

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agopatch 9.1.1509: patch 9.1.1505 was not good v9.1.1509
Hirohito Higashi [Sat, 5 Jul 2025 13:31:23 +0000 (15:31 +0200)] 
patch 9.1.1509: patch 9.1.1505 was not good

Problem:  Patch 9.1.1505 was not good
Solution: Revert "patch 9.1.1505: not possible to return completion type
          for :ex command" and instead add the getcompletiontype()
          function (Hirohito Higashi).

related: #17606
closes: #17662

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agoruntime(vim): Update base-syntax, match escape sequences in :command blocks
Doug Kearns [Sat, 5 Jul 2025 13:21:03 +0000 (15:21 +0200)] 
runtime(vim): Update base-syntax, match escape sequences in :command blocks

- Match escape sequences in :command replacement blocks.
- Match :substitute after escape sequences (a temporary fix until Ex
  commands are contained).

fixes: #17326
closes: #17663

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 weeks agoruntime(go): fix `b:undo_ftplugin`
ichizok [Sat, 5 Jul 2025 13:18:41 +0000 (15:18 +0200)] 
runtime(go): fix `b:undo_ftplugin`

last `unmap` can cause the error "E31: No such mapping" when
`doaudocmd FileType go` if appending other commands to `b:undo_ftplugin` i.e.
the space and the next bar as `let b:undo_ftplugin .= ' | setl ...'`.

closes: #17664

Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1508: string manipulation can be improved in cmdexpand.c v9.1.1508
John Marriott [Thu, 3 Jul 2025 19:28:50 +0000 (21:28 +0200)] 
patch 9.1.1508: string manipulation can be improved in cmdexpand.c

Problem:  String manipulation can be improved in cmdexpand.c
Solution: Refactor cmdexpand.c to remove calls to
          STRLEN()/STRMOVE()/STRCAT() (John Marriott)

This commit does the following:

In function nextwild():
  - slightly refactor the for loop to remove an array access
  - call STRLEN() and store it's result for reuse
  - move some variables closer to where they are used, renaming some on
    the way

In function ExpandOne():
  - move some calculations outside of the for loops
  - factor out calls to STRCAT() (which has an inherent STRLEN() call) in
    the for loop
  - move some variables closer to where they are used

In function expand_files_and_dirs():
  - factor out calls to STRMOVE() (which has an inherent STRLEN() call)

In function get_filetypecmd_arg():
  - move declarations of the string arrays into the blocks where they are
    used

In function get_breakadd_arg():
  - move declaration of the string array into the block where it is
    used

In function globpath():
  - factor out calls to STRLEN() and STRCAT()
  - move some variables closer to where they are used

And finally some minor cosmetic style changes

closes: #17639

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(vim): Update base-syntax and generator, match all default highlight groups
Doug Kearns [Thu, 3 Jul 2025 18:57:03 +0000 (20:57 +0200)] 
runtime(vim): Update base-syntax and generator, match all default highlight groups

- Match Conceal, ComplMatchIns, MsgArea, Terminal, and User[1-9]
  highlight groups.
- Generate the vimGroup syntax group from runtime/syncolor.vim.
- Match :SynColor and :SynLink as special user commands.

fixes #17467
closes: #17556

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(vim): Update base-syntax and generator, generate command modifiers
Doug Kearns [Thu, 3 Jul 2025 18:47:50 +0000 (20:47 +0200)] 
runtime(vim): Update base-syntax and generator, generate command modifiers

Generate Ex command modifiers from the modifier table in src/ex_docmd.c

closes: #17564

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1507: symlinks are resolved on :cd commands v9.1.1507
glepnir [Thu, 3 Jul 2025 18:41:23 +0000 (20:41 +0200)] 
patch 9.1.1507: symlinks are resolved on :cd commands

Problem:  File paths change from symlink to target path after :cd command
          when editing files through symbolic links
Solution: Add "~" flag to 'cpoptions' to control symlink resolution.
          When not included (default), symlinks are resolved maintaining
          backward compatibility. When included, symlinks are preserved
          providing the improved behavior. (glepnir)

related: neovim/neovim#15695
closes: #17628

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(postscr): Correct some standard font names in syntax
Mike Williams [Thu, 3 Jul 2025 18:31:52 +0000 (20:31 +0200)] 
runtime(postscr): Correct some standard font names in syntax

closes: #17647

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(optwin): show 'guiligatures' option also on MS-Windows builds
RestorerZ [Thu, 3 Jul 2025 18:27:37 +0000 (20:27 +0200)] 
runtime(optwin): show 'guiligatures' option also on MS-Windows builds

closes: #17650

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1506: tests: missing cleanup in Test_search_cmdline_incsearch_highlight() v9.1.1506
zeertzjq [Thu, 3 Jul 2025 18:02:02 +0000 (20:02 +0200)] 
patch 9.1.1506: tests: missing cleanup in Test_search_cmdline_incsearch_highlight()

Problem:  tests: missing cleanup test_override('char_avail', 0) in
          Test_search_cmdline_incsearch_highlight().
Solution: Add the missing cleanup (zeertzjq).

closes: #17655

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1505: not possible to return completion type for :ex command v9.1.1505
Shougo Matsushita [Thu, 3 Jul 2025 17:57:00 +0000 (19:57 +0200)] 
patch 9.1.1505: not possible to return completion type for :ex command

Problem:  not possible to return command-line completion type for :ex
          command
Solution: make getcmdcompltype() accept an optional and return the
          command-line completion for that arg (Shougo Matsushita).

closes: #17606

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1504: filetype: numbat files are not recognized v9.1.1504
0xadk [Wed, 2 Jul 2025 17:46:05 +0000 (19:46 +0200)] 
patch 9.1.1504: filetype: numbat files are not recognized

Problem:  filetype: numbat files are not recognized
Solution: detect *.nbt files as numbat filetype (0xadk)

References:
- https://github.com/sharkdp/numbat
- https://github.com/sharkdp/numbat/tree/master/numbat/modules

closes: #17643

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1503: filetype: haxe files are not recognized v9.1.1503
0xadk [Wed, 2 Jul 2025 17:41:11 +0000 (19:41 +0200)] 
patch 9.1.1503: filetype: haxe files are not recognized

Problem:  filetype: haxe files are not recognized
Solution: detect *.hx files as haxe filetype (0xadk)

References:
- https://haxe.org/
- https://code.haxe.org/category/beginner/hello-world.html

closes: #17644

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1502: filetype: quickbms files are not recognized v9.1.1502
0xadk [Wed, 2 Jul 2025 17:33:36 +0000 (19:33 +0200)] 
patch 9.1.1502: filetype: quickbms files are not recognized

Problem:  filetype: quickbms files are not recognized
Solution: detect *.bms files as quickbms filetype
          (0xadk)

Reference:
- https://aluigi.altervista.org/quickbms.htm

closes: #17645

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1501: filetype: flix files are not recognized v9.1.1501
0xadk [Wed, 2 Jul 2025 16:55:55 +0000 (18:55 +0200)] 
patch 9.1.1501: filetype: flix files are not recognized

Problem:  filetype: flix files are not recognized
Solution: detect *.flix files as flix filetype
          (0xadk)

References:
- https://flix.dev/
- https://doc.flix.dev/introduction.html

closes: #17646

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(go): add section movement mappings to ftplugin
Rob B [Wed, 2 Jul 2025 16:46:44 +0000 (18:46 +0200)] 
runtime(go): add section movement mappings to ftplugin

closes: #17641

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(doc): Tweak documentation style
Hirohito Higashi [Tue, 1 Jul 2025 20:07:50 +0000 (22:07 +0200)] 
runtime(doc): Tweak documentation style

closes: #17638

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1500: if_python: typo in python error variable v9.1.1500
Damien Lejay [Tue, 1 Jul 2025 19:57:59 +0000 (21:57 +0200)] 
patch 9.1.1500: if_python: typo in python error variable

Problem:  if_python: typo in python error variable
Solution: fix typo (Damien Lejay)

closes: #17640

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1499: MS-Windows: no indication of ARM64 architecture v9.1.1499
RestorerZ [Tue, 1 Jul 2025 19:30:21 +0000 (21:30 +0200)] 
patch 9.1.1499: MS-Windows: no indication of ARM64 architecture

Problem:  MS-Windows: no indication of ARM64 architecture
Solution: Add ARM64 to version output and include in nsis installer
          (RestorerZ)

related: vim/vim-win32-installer#381
closes: #17642

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(tutor): regenerate utf-8 version of French vimtutor manpage
Damien Lejay [Mon, 30 Jun 2025 18:28:46 +0000 (20:28 +0200)] 
runtime(tutor): regenerate utf-8 version of French vimtutor manpage

related: #17546

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(netrw): upstream snapshot of v183
Luca Saccarola [Mon, 30 Jun 2025 18:26:03 +0000 (20:26 +0200)] 
runtime(netrw): upstream snapshot of v183

relevant commits:
- distribution: remove NetrwSettings.vim

closes: #17635

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(vim): Update base-syntax, improve :syn-sync line defaults
Doug Kearns [Mon, 30 Jun 2025 18:22:38 +0000 (20:22 +0200)] 
runtime(vim): Update base-syntax, improve :syn-sync line defaults

Set minlines and maxlines to 100 and 200 respectively.  Set these after
the script interface syntax files have been loaded to ensure the values
set in those are overridden.

fixes #17580
closes: #17614

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1498: completion: 'complete' funcs behave different to 'omnifunc' v9.1.1498
Girish Palya [Mon, 30 Jun 2025 18:14:43 +0000 (20:14 +0200)] 
patch 9.1.1498: completion: 'complete' funcs behave different to 'omnifunc'

Problem:  completion: Functions specified in the 'complete' option did
          not have the leader string removed when called with findstart = 0,
          unlike 'omnifunc' behavior
Solution: update behaviour and make behaviour consistent (Girish Palya)

closes: #17636

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1497: Link error with shm_open() v9.1.1497
Christian Brabandt [Sun, 29 Jun 2025 20:39:14 +0000 (22:39 +0200)] 
patch 9.1.1497: Link error with shm_open()

Problem:  Link error with shm_open()
          (gcanat, after v9.1.1485)
Solution: use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE

fixes: #17634

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1496: terminal: still not highlighting empty cells correctly v9.1.1496
Christian Brabandt [Sun, 29 Jun 2025 20:22:05 +0000 (22:22 +0200)] 
patch 9.1.1496: terminal: still not highlighting empty cells correctly

Problem:  terminal: still not highlighting empty cells correctly
          (Yousef Mohammed, after v9.1.1489)
Solution: Use vcol instead of col

closes: #17632

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoREADME: mention POSIX vi as a goal of this project
Christian Brabandt [Sun, 29 Jun 2025 16:27:41 +0000 (18:27 +0200)] 
README: mention POSIX vi as a goal of this project

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1495: Wayland: uses $XDG_SEAT to determine seat v9.1.1495
Foxe Chen [Sun, 29 Jun 2025 16:00:46 +0000 (18:00 +0200)] 
patch 9.1.1495: Wayland: uses $XDG_SEAT to determine seat

Problem:  Wayland: uses $XDG_SEAT to determine seat to use
          (dr0bz, after v9.1.1485)
Solution: Do not try to determine the seat from $XDG_SEAT, remove the
          code that checks for this environment variable (Foxe Chen).

related: https://github.com/vim/vim/issues/5157#issuecomment-3015248239
closes: #17625

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoci: Use tmate for debugging Github Actions CI
Christian Brabandt [Sun, 29 Jun 2025 15:57:32 +0000 (17:57 +0200)] 
ci: Use tmate for debugging Github Actions CI

closes: #17631

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoci: disable installing netbeans on Windows runners
Christian Brabandt [Sun, 29 Jun 2025 15:56:44 +0000 (17:56 +0200)] 
ci: disable installing netbeans on Windows runners

It causes CI to fail because the netbeans package has been moved

related: tunisiano187/Chocolatey-packages#3916
related: #17631

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1494: runtime(tutor): no French translation for Chapter 2 v9.1.1494
Damien Lejay [Sun, 29 Jun 2025 15:50:20 +0000 (17:50 +0200)] 
patch 9.1.1494: runtime(tutor): no French translation for Chapter 2

Problem:  runtime(tutor): no French translation for Chapter 2
Solution: add and refine French translation of tutor2, update French
          vimtutor manpage (Damien Lejay)

- Add runtime/tutor/tutor2.fr.utf-8
- Improve translation based on review
- Update references in tutor1.fr and vimtutor-fr.1
- Adjust MAINTAINERS accordingly

closes: #17546

Co-authored-by: Gabriel Dupras <57042631+gdupras@users.noreply.github.com>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(tutor): apply fixes to runtime/tutor/tutor2
Damien Lejay [Sun, 29 Jun 2025 15:49:09 +0000 (17:49 +0200)] 
runtime(tutor): apply fixes to runtime/tutor/tutor2

- Fix minor typos and formatting
- Restore accidentally removed file
- Normalize <C-r> to <CTRL-R>
- Apply reviewer suggestions

related: #17546

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agotranslation(it): updated Italian manpage
Antonio Giovanni Colombo [Sun, 29 Jun 2025 15:37:43 +0000 (17:37 +0200)] 
translation(it): updated Italian manpage

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1493: manually comparing positions on buffer v9.1.1493
glepnir [Sun, 29 Jun 2025 14:51:40 +0000 (16:51 +0200)] 
patch 9.1.1493: manually comparing positions on buffer

Problem:  manually comparing positions on buffer
          (after v9.1.1490)
Solution: use the LTOREQ_POS() macro, fix a few other minor style issues
          (glepnir)

closes: #17629

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agonsis: copy tutor directory recursively
RestorerZ [Sun, 29 Jun 2025 14:23:33 +0000 (16:23 +0200)] 
nsis: copy tutor directory recursively

fixes: vim/vim-win32-installer#382
closes: #17630

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1492: tests: failure when Wayland compositor fails to start v9.1.1492
Christian Brabandt [Sat, 28 Jun 2025 19:03:25 +0000 (21:03 +0200)] 
patch 9.1.1492: tests: failure when Wayland compositor fails to start

Problem:  tests: failure when Wayland compositor fails to start
Solution: instead of throwing an error causing a failure, throw
          "Skipped", so that the Vim test suite continues and does not
          fail

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1491: missing out-of-memory checks in cmdexpand.c v9.1.1491
John Marriott [Sat, 28 Jun 2025 18:41:54 +0000 (20:41 +0200)] 
patch 9.1.1491: missing out-of-memory checks in cmdexpand.c

Problem:  missing out-of-memory checks in cmdexpand.c
Solution: add out-of-memory checks for expand_files_and_dirs(),
          ExpandUserDefined() and ExpandUserList()
          (John Marriott)

closes: #17570

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(vim): re-generate vim syntax script after v9.1.1487
Christian Brabandt [Sat, 28 Jun 2025 18:23:32 +0000 (20:23 +0200)] 
runtime(vim): re-generate vim syntax script after v9.1.1487

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1490: 'wildchar' does not work in search contexts v9.1.1490
Girish Palya [Sat, 28 Jun 2025 17:47:34 +0000 (19:47 +0200)] 
patch 9.1.1490: 'wildchar' does not work in search contexts

Problem:  'wildchar' does not work in search contexts
Solution: implement search completion when 'wildchar' is typed
          (Girish Palya).

This change enhances Vim's command-line completion by extending
'wildmode' behavior to search pattern contexts, including:

- '/' and '?' search commands
- ':s', ':g', ':v', and ':vim' commands

Completions preserve the exact regex pattern typed by the user,
appending the completed word directly to the original input. This
ensures that all regex elements — such as '<', '^', grouping brackets
'()', wildcards '\*', '.', and other special characters — remain intact
and in their original positions.

---

**Use Case**

While searching (using `/` or `?`) for lines containing a pattern like
`"foobar"`, you can now type a partial pattern (e.g., `/f`) followed by
a trigger key (`wildchar`) to open a **popup completion menu** showing
all matching words.

This offers two key benefits:

1. **Precision**: Select the exact word you're looking for without
typing it fully.
2. **Memory aid**: When you can’t recall a full function or variable
name, typing a few letters helps you visually identify and complete the
correct symbol.

---

**What’s New**

Completion is now supported in the following contexts:

- `/` and `?` search commands
- `:s`, `:g`, `:v`, and `:vimgrep` ex-commands

---

**Design Notes**

- While `'wildchar'` (usually `<Tab>`) triggers completion, you'll have
to use `<CTRL-V><Tab>` or "\t" to search for a literal tab.
- **Responsiveness**: Search remains responsive because it checks for
user input frequently.

---

**Try It Out**

Basic setup using the default `<Tab>` as the completion trigger:

```vim
set wim=noselect,full wop=pum wmnu
```

Now type:

```
/foo<Tab>
```

This opens a completion popup for matches containing "foo".
For matches beginning with "foo" type `/\<foo<Tab>`.

---

**Optional: Autocompletion**

For automatic popup menu completion as you type in search or `:`
commands, include this in your `.vimrc`:

```vim
vim9script
set wim=noselect:lastused,full wop=pum wcm=<C-@> wmnu

autocmd CmdlineChanged [:/?] CmdComplete()

def CmdComplete()
  var [cmdline, curpos, cmdmode] = [getcmdline(), getcmdpos(),
expand('<afile>') == ':']
  var trigger_char = '\%(\w\|[*/:.-]\)$'
  var not_trigger_char = '^\%(\d\|,\|+\|-\)\+$'  # Exclude numeric range
  if getchar(1, {number: true}) == 0  # Typehead is empty, no more
pasted input
      && !wildmenumode() && curpos == cmdline->len() + 1
      && (!cmdmode || (cmdline =~ trigger_char && cmdline !~
not_trigger_char))
    SkipCmdlineChanged()
    feedkeys("\<C-@>", "t")
    timer_start(0, (_) => getcmdline()->substitute('\%x00', '',
'ge')->setcmdline())  # Remove <C-@>
  endif
enddef

def SkipCmdlineChanged(key = ''): string
  set ei+=CmdlineChanged
  timer_start(0, (_) => execute('set ei-=CmdlineChanged'))
  return key == '' ? '' : ((wildmenumode() ? "\<C-E>" : '') .. key)
enddef

**Optional: Preserve history recall behavior**
cnoremap <expr> <Up> SkipCmdlineChanged("\<Up>")
cnoremap <expr> <Down> SkipCmdlineChanged("\<Down>")

**Optional: Customize popup height**
autocmd CmdlineEnter : set bo+=error | exec $'set ph={max([10,
winheight(0) - 4])}'
autocmd CmdlineEnter [/?] set bo+=error | set ph=8
autocmd CmdlineLeave [:/?] set bo-=error ph&
```

closes: #17570

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(doc): fix :vmap example to avoid unwanted spaces with JJ
Damien Lejay [Sat, 28 Jun 2025 17:19:04 +0000 (19:19 +0200)] 
runtime(doc): fix :vmap example to avoid unwanted spaces with JJ

fixes: #17621
closes: #17623

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1489: terminal: no visual highlight of empty cols with empty 'listchars' v9.1.1489
Christian Brabandt [Sat, 28 Jun 2025 16:40:15 +0000 (18:40 +0200)] 
patch 9.1.1489: terminal: no visual highlight of empty cols with empty 'listchars'

Problem:  terminal: no visual highlight of empty cols when 'listchars'
          is empty (Yousef Mohammed)
Solution: reset wlv.win_attr when column is zero and we are drawing a
          terminal buffer

fixes: #17559
closes: #17618

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1488: configure: using obsolete macro AC_PROG_GCC_TRADITIONAL v9.1.1488
Christian Brabandt [Sat, 28 Jun 2025 16:37:49 +0000 (18:37 +0200)] 
patch 9.1.1488: configure: using obsolete macro AC_PROG_GCC_TRADITIONAL

Problem:  configure: using obsolete macro AC_PROG_GCC_TRADITIONAL
Solution: drop it from configure.ac, regenerate auto/configure

Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(doc): Fix modeline in wayland.txt
Hirohito Higashi [Sat, 28 Jun 2025 16:34:48 +0000 (18:34 +0200)] 
runtime(doc): Fix modeline in wayland.txt

related: #17619

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1487: :cl doesn't invoke :clist v9.1.1487
Hirohito Higashi [Sat, 28 Jun 2025 16:28:25 +0000 (18:28 +0200)] 
patch 9.1.1487: :cl doesn't invoke :clist

Problem:  :cl doesn't invoke :clist
          (after v9.1.1485)
Solution: fix order of definition in ex_cmds.h
          (Hirohito Higashi)

closes: #17619

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1486: documentation issues with Wayland v9.1.1486
Hirohito Higashi [Sat, 28 Jun 2025 16:18:21 +0000 (18:18 +0200)] 
patch 9.1.1486: documentation issues with Wayland

Problem:  documentation issues with Wayland
          (after v9.1.1485)
Solution: Tweak documentation style. Capitalize the first letter of
          Wayland (Hirohito Higashi)

related: #17619

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoMaintainers: Update MAINTAINERS file 17624/head
Damien Lejay [Sat, 28 Jun 2025 16:13:02 +0000 (18:13 +0200)] 
Maintainers: Update MAINTAINERS file

closes: #17622

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agopatch 9.1.1485: missing Wayland clipboard support v9.1.1485
Foxe Chen [Fri, 27 Jun 2025 19:10:35 +0000 (21:10 +0200)] 
patch 9.1.1485: missing Wayland clipboard support

Problem:  missing Wayland clipboard support
Solution: make it work (Foxe Chen)

fixes: #5157
closes: #17097

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(pandoc): sync syntax script with upstream
Jake Zimmerman [Fri, 27 Jun 2025 16:38:34 +0000 (18:38 +0200)] 
runtime(pandoc): sync syntax script with upstream

closes: #17598

Signed-off-by: Jake Zimmerman <zimmerman.jake@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
4 weeks agoruntime(netrw): upstream snapshot of v182
Luca Saccarola [Fri, 27 Jun 2025 16:28:17 +0000 (18:28 +0200)] 
runtime(netrw): upstream snapshot of v182

relevant commits:
- refactor: cleanup netrw#BrowseX
- fix: correctly handle symlinks in treeview
- chore: add minimalrc for reproducing issues
- refactor: simplify s:NetrwInit with the 'newer' assignment syntax
- refactor: remove balloon functionality
- Tune local file listing especially for Windows network drives
- interim fix for browse open with multiple windows

closes: #17616

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1484: tests: Turkish locale tests fails on Mac v9.1.1484
Christian Brabandt [Thu, 26 Jun 2025 21:04:37 +0000 (23:04 +0200)] 
patch 9.1.1484: tests: Turkish locale tests fails on Mac

Problem:  tests: Turkish locale tests fails on Mac
          (after v9.1.1480)
Solution: skip the test Test_pos_percentage_in_turkish_locale() on Mac

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1483: not possible to translation position in buffer v9.1.1483
Emir SARI [Thu, 26 Jun 2025 18:38:16 +0000 (20:38 +0200)] 
patch 9.1.1483: not possible to translation position in buffer

Problem:  not possible to translation position in buffer
Solution: use _() macro to mark the output as translatable
          (Emir SARI)

Row/Column indicator separator is currently not customizable. Some
languages have a space after the comma as the usual practice, plus this
would help translators use a custom separator like colons if necessary.

Additionally, after a save, the line and the byte indicator is also
hardcoded, this enables i18n for that as well.

closes: #17608

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1482: scrolling with 'splitkeep' and line() v9.1.1482
Luuk van Baal [Thu, 26 Jun 2025 18:34:15 +0000 (20:34 +0200)] 
patch 9.1.1482: scrolling with 'splitkeep' and line()

Problem:  Topline is preemptively updated by line() in WinResized
          autocmd with 'splitkeep' != "cursor".
Solution: Set `skip_update_topline` when 'splitkeep' != "cursor".
          (Luuk van Baal)

related: neovim/neovim#34666
closes: #17613

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(doc): mismatch between the :uniq document's description and examples
Hirohito Higashi [Thu, 26 Jun 2025 18:31:24 +0000 (20:31 +0200)] 
runtime(doc): mismatch between the :uniq document's description and examples

closes: #17612

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(diff): fix regex for matching no-eol match
A4-Tacks [Thu, 26 Jun 2025 18:29:18 +0000 (20:29 +0200)] 
runtime(diff): fix regex for matching no-eol match

closes: #17610

Signed-off-by: A4-Tacks <wdsjxhno1001@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(netrw): remove the fun from netrw :)
Luca Saccarola [Wed, 25 Jun 2025 19:23:43 +0000 (21:23 +0200)] 
runtime(netrw): remove the fun from netrw :)

closes: #17584

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(doc): update description of :uniq command
zeertzjq [Wed, 25 Jun 2025 19:07:25 +0000 (21:07 +0200)] 
runtime(doc): update description of :uniq command

The examples mention the [u] flag, so at least the [u] flag should be
introduced before the examples.

Slightly reword the sentence about trailing/leading white space.

closes: #17604

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(vim): Update base-syntax, match unamed register alias
Doug Kearns [Wed, 25 Jun 2025 18:58:50 +0000 (20:58 +0200)] 
runtime(vim): Update base-syntax, match unamed register alias

The unamed register may be referenced as both @" and @@.

Remove the unused vimPlainRegister syntax group.

fixes: #17603.
closes: #17605

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1481: gcc complains about uninitialized variable v9.1.1481
Christian Brabandt [Wed, 25 Jun 2025 18:54:11 +0000 (20:54 +0200)] 
patch 9.1.1481: gcc complains about uninitialized variable

Problem:  gcc complains about uninitialized variable
          (Tony Mechelynck, after v9.1.1476)
Solution: initialize variable

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(doc): improve documentation style in editing.txt
mityu [Wed, 25 Jun 2025 18:46:34 +0000 (20:46 +0200)] 
runtime(doc): improve documentation style in editing.txt

Usually, Vim's document provides example code after explanations.
However some part of the editing.txt doesn't follow the style, therefore
this commit modifies it so that it follows the usual style.

closes: #17607

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: mityu <mityu.mail@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1480: Turkish translation outdated v9.1.1480
Emir SARI [Wed, 25 Jun 2025 18:32:27 +0000 (20:32 +0200)] 
patch 9.1.1480: Turkish translation outdated

Problem:  Turkish translation outdated
Solution: Update Turkish translations, enable disabled test from
          v9.1.1479 (Emir SARI)

closes: #17597

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1479: regression when displaying localized percentage position v9.1.1479
Emir SARI [Wed, 25 Jun 2025 18:22:43 +0000 (20:22 +0200)] 
patch 9.1.1479: regression when displaying localized percentage position

Problem:  regression when displaying localized percentage position
          (after v9.1.1291)
Solution: calculate percentage first (Emir SARI)

Cleanups made in ec032de broke the Turkish percent display, failing to
prepend it properly in cases between 0 and 10. In Turkish, the percent
sign is prepended to the number, so it was displaying it as `% 5`
(should have been `%5`), while displaying numbers bigger than 9 properly.

related: #17597

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agotranslation(it): update Italian manpage for vimtutor
Antonio Giovanni Colombo [Tue, 24 Jun 2025 19:16:32 +0000 (21:16 +0200)] 
translation(it): update Italian manpage for vimtutor

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(vim): Update base-syntax, match :uniq command
Doug Kearns [Tue, 24 Jun 2025 18:23:34 +0000 (20:23 +0200)] 
runtime(vim): Update base-syntax, match :uniq command

closes: #17601

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1478: Unused assignment in ex_uniq() v9.1.1478
zeertzjq [Tue, 24 Jun 2025 17:58:36 +0000 (19:58 +0200)] 
patch 9.1.1478: Unused assignment in ex_uniq()

Problem:  Unused assignment in ex_uniq() (after v9.1.1476)
Solution: Remove the assignment and the wrong comments above
          (zeertzjq).

closes: #17596

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(vim): Update base-syntax, match OR operator in :echo and :execute
Doug Kearns [Mon, 23 Jun 2025 19:51:44 +0000 (21:51 +0200)] 
runtime(vim): Update base-syntax, match OR operator in :echo and :execute

Don't match the OR operator in expressions as a trailing bar.

closes: #17533

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1476: no easy way to deduplicate text v9.1.1477
Hirohito Higashi [Mon, 23 Jun 2025 19:42:36 +0000 (21:42 +0200)] 
patch 9.1.1476: no easy way to deduplicate text

Problem:  no easy way to deduplicate text
Solution: add the :uniq ex command
          (Hirohito Higashi)

closes: #17538

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(java): Complement the recognition of type parameter sections
Aliaksei Budavei [Mon, 23 Jun 2025 18:02:14 +0000 (20:02 +0200)] 
runtime(java): Complement the recognition of type parameter sections

In addition to matching type parameter sections of generic
classes and records and interfaces, match such sections of
generic methods and constructors.  As before, opt for it by
defining "g:java_highlight_generics"; the diamond form still
does not qualify for this kind of recognition.

And make section patterns agree with one another in syntax
items.

References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.5
https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.4.4
https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.8.4

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1476: missing out-of-memory checks in cmdexpand.c v9.1.1476
John Marriott [Mon, 23 Jun 2025 17:57:29 +0000 (19:57 +0200)] 
patch 9.1.1476: missing out-of-memory checks in cmdexpand.c

Problem:  missing out-of-memory checks in cmdexpand.c
Solution: add missing out-of-memory checks, re-order code
          (John Marriott)

This commit does the following:
- in cmdline_pum_create() add out-of-memory check call of ALLOC_MULT()
- in expand_cmdline() move check for out-of-memory to cover both
  assignments of file_str
- in nextwild() don't free `p2` until after it's last use.

closes: #17592

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(doc): vimtutor starts Vim in nocompatible mode
Christian Brabandt [Mon, 23 Jun 2025 17:52:42 +0000 (19:52 +0200)] 
runtime(doc): vimtutor starts Vim in nocompatible mode

closes: #17593

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(doc): remove wrong documentation of the :digraph command
Christian Brabandt [Sun, 22 Jun 2025 18:32:15 +0000 (20:32 +0200)] 
runtime(doc): remove wrong documentation of the :digraph command

fixes: #17583

Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1475: completion: regression when "nearest" in 'completeopt' v9.1.1475
Girish Palya [Sun, 22 Jun 2025 18:23:54 +0000 (20:23 +0200)] 
patch 9.1.1475: completion: regression when "nearest" in 'completeopt'

Problem:  completion: regression when "nearest" in 'completeopt'
Solution: fix compare function (Girish Palya)

closes: #17577

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(comment): add <Plug>-mappings
Mark Woods [Sun, 22 Jun 2025 18:16:29 +0000 (20:16 +0200)] 
runtime(comment): add <Plug>-mappings

vim9script <expr> mappings relying on imports cannot be evaluated
outside of the script file with the imports, so do not work with plugins
like vim-which-key, which evaluates <expr> mappings to apply them.

Using <Plug> mappings is one way to address this, and has the added
benefit of reading like a description for users finding the mappings.

fixes: #17523
closes: #17563

Signed-off-by: Mark Woods <mwoods.online.ie@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(openPlugin): add <Plug>-mappings
Mark Woods [Sun, 22 Jun 2025 18:12:16 +0000 (20:12 +0200)] 
runtime(openPlugin): add <Plug>-mappings

vim9script <scriptcmd> mappings relying on imports cannot be evaluated
outside of the script file with the imports, so do not work with plugins
like vim-which-key, which applies the mappings using feedkeys().

Using <Plug> mappings is one way to address this, and has the added
benefit of reading like a description for users finding the mappings.

related: #17563

Signed-off-by: Mark Woods <mwoods.online.ie@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1474: missing out-of-memory check in mark.c v9.1.1474
John Marriott [Sun, 22 Jun 2025 17:44:27 +0000 (19:44 +0200)] 
patch 9.1.1474: missing out-of-memory check in mark.c

Problem:  missing out-of-memory check in mark.c
Solution: bail out, if mark_line() returns NULL
          (John Marriott)

closes: #17578

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(tutor): Make all tutor files utf-8 only
Damien Lejay [Sun, 22 Jun 2025 17:39:04 +0000 (19:39 +0200)] 
runtime(tutor): Make all tutor files utf-8 only

In this commit, all legacy encodings for tutor files are removed.

* All the tutor files `tutor1.xx` and `tutor2.xx` are now `utf-8`
* All `README.xx.txt` files are now `utf-8`
* All makefiles are removed, as they are no longer needed
* The `tutor.vim` script is simplified
* The `README` indicates `utf-8` as a requirement
* update vimtutor.bat file

In 2025, there is no realistic scenario where a beginner starts the Vim
9.1 tutor on a machine that lacks UTF-8 support.
This change will ease the maintenance of the tutor files. Cf #17562 for
an example.

closes: #17582
closes: #17586

Co-authored-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(vim): Update base-syntax, match bare mark ranges
Doug Kearns [Sun, 22 Jun 2025 16:47:49 +0000 (18:47 +0200)] 
runtime(vim): Update base-syntax, match bare mark ranges

Remove unmatchable :normal {mark,register} matches. The arg to :normal
is now handled separately and contained marks and registers are no
longer matched.

closes: #17571

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agoruntime(vim): Update base-syntax, fix Vim9 :import expression comment handling
Doug Kearns [Fri, 20 Jun 2025 16:59:21 +0000 (18:59 +0200)] 
runtime(vim): Update base-syntax, fix Vim9 :import expression comment handling

The required space in Vim9 continuation comments (#\ comment) was
accidentally removed in commit 6acca4b as trailing whitespace.

closes: #17573

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
5 weeks agopatch 9.1.1473: inconsistent range arg for :diffget/diffput v9.1.1473
Yee Cheng Chin [Fri, 20 Jun 2025 16:44:18 +0000 (18:44 +0200)] 
patch 9.1.1473: inconsistent range arg for :diffget/diffput

Problem:  inconsistent range arg for :diffget/diffput
Solution: fix the range specification, place the cursor for :diffput and
          :diffget consistently on the last line (Yee Cheng Chin)

Previously, `:<range>diffget` only allowed using 1 or above in the range
value, making it impossible to use the command for a diff block at the
beginning of the file. Fix the range specification so the user can now
use 0 to specify the space before the first line. This allows
`:0,$+1diffget` to work to retrieve all the changes from the other file
instead of missing the first diff block. Also do this for `:diffput`.

Also, make `:diffput` work more similar to `:diffget`. Make it so that
if the cursor is on the last line and a new line is inserted in the
other file, doing `:diffput` will select that diff block below the line,
just like `:diffget` would.

Also clean up the logic a little bit for edge cases and for handling
line matched diff blocks better.

closes: #17579

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agoruntime(doc): mention using <script> instead of <sfile> in :autocmd
zeertzjq [Thu, 19 Jun 2025 17:40:51 +0000 (19:40 +0200)] 
runtime(doc): mention using <script> instead of <sfile> in :autocmd

fixes: #17569

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agopatch 9.1.1472: if_python: PySequence_Fast_{GET_SIZE,GET_ITEM} removed v9.1.1472
Zdenek Dohnal [Thu, 19 Jun 2025 17:35:32 +0000 (19:35 +0200)] 
patch 9.1.1472: if_python: PySequence_Fast_{GET_SIZE,GET_ITEM} removed

Problem:  if_python: PySequence_Fast_{GET_SIZE,GET_ITEM} removed with
          python3.14 in stable ABI
Solution: use PySequence_{Size,GetItem} instead (Zdenek Dohnal)

Python 3.14 removed those two functions from stable API because of
reasoning these function shouldn't be part of stable API at the first
place.

Moving to PySequence_GetSize and PySequence_GetItem fixes the build
failure when Vim is built with dynamic Python and stable API for Python
3.8.

closes: #17575

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agopatch 9.1.1471: completion: inconsistent ordering with CTRL-P v9.1.1471
Girish Palya [Wed, 18 Jun 2025 17:15:45 +0000 (19:15 +0200)] 
patch 9.1.1471: completion: inconsistent ordering with CTRL-P

Problem:  completion: inconsistent ordering with CTRL-P
          (zeertzjq)
Solution: reset compl_curr_match when using CTRL-P (Girish Palya)

fixes: #17425
closes: #17434

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agoruntime(doc): Remove obsolete labelling from 'h' occasion in :help 'highlight'
Doug Kearns [Wed, 18 Jun 2025 17:12:07 +0000 (19:12 +0200)] 
runtime(doc): Remove obsolete labelling from 'h' occasion in :help 'highlight'

The 'h' occasion is now used for "matched text of currently inserted
completion" (defaulting to ComplMatchIns).

closes: #17572

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agoruntime(hgcommit): set comments and commentstring options in filetype plugin
Riley Bruins [Wed, 18 Jun 2025 16:47:57 +0000 (18:47 +0200)] 
runtime(hgcommit): set comments and commentstring options in filetype plugin

closes: #17480

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agoruntime(ishd): set comments and commentstring options in filetype plugin
Riley Bruins [Wed, 18 Jun 2025 16:43:42 +0000 (18:43 +0200)] 
runtime(ishd): set comments and commentstring options in filetype plugin

closes: #17490

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agoruntime(nroff,groff): update commentstyle in filetype plugins
jtmr05 [Wed, 18 Jun 2025 16:41:14 +0000 (18:41 +0200)] 
runtime(nroff,groff): update commentstyle in filetype plugins

closes: #17516

Signed-off-by: jtmr05 <62111562+jtmr05@users.noreply.github.com>
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agopatch 9.1.1470: use-after-free with popup callback on error v9.1.1470
Christian Brabandt [Wed, 18 Jun 2025 16:33:31 +0000 (18:33 +0200)] 
patch 9.1.1470: use-after-free with popup callback on error

Problem:  use-after-free with popup callback on error
          (Brian Carbone, lifepillar)
Solution: check if the popup window is valid before accessing it

fixes: #17558
closes: #17565

Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agopatch 9.1.1469: potential buffer-underflow with invalid hl_id v9.1.1469
Christian Brabandt [Wed, 18 Jun 2025 16:28:19 +0000 (18:28 +0200)] 
patch 9.1.1469: potential buffer-underflow with invalid hl_id

Problem:  potential buffer-underflow with invalid hl_id (mugitya03)
Solution: assert that the return-code of syn_get_final_id() if > 0

As a safety check, syn_get_final_id() may return zero when either the
provided hl_id is zero or larger than expected.

However, many callers of syn_get_final_id() do not check that the return
value is larger than zero but re-use the returned highlight id directly
like this:

  hl_id = syn_get_final_id(hl_id);
  sgp = &HL_TABLE()[hl_id - 1];     // index is ID minus one

in which case, this would cause a buffer underrun and an access violation.

Let's use assert(hl_id > 0); to make sure that hl_id is larger than
zero.

Note to myself: I'll need to compile releases builds using -DNDEBUG once
a new release will be made

fixes: #17475
closes: #17512

Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agopatch 9.1.1468: filetype: bright(er)script files are not recognized v9.1.1468
Riley Bruins [Wed, 18 Jun 2025 16:23:05 +0000 (18:23 +0200)] 
patch 9.1.1468: filetype: bright(er)script files are not recognized

Problem:  filetype: bright(er)script files are not recognized
Solution: detect *.bs files as brighterscript filetype and *.brs as
          brightscript filetype, include filetype plugins (Riley Bruins)

closes: #17566

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agopatch 9.1.1467: too many strlen() calls v9.1.1467
John Marriott [Wed, 18 Jun 2025 16:15:31 +0000 (18:15 +0200)] 
patch 9.1.1467: too many strlen() calls

Problem:  too many strlen() calls
Solution: Change expand_env() to return string length
          (John Marriott)

This commit does the following changes:
- In expand_env_esc():
  - return the length of the returned dst string.
  - refactor to remove some calls to STRLEN() and STRCAT()
  - add check for out-of-memory condition.
- Change call sites in various source files to use the return value

closes: #17561

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agoruntime(vim): fix incorrect highlighting of User autocmds
zeertzjq [Wed, 18 Jun 2025 16:02:47 +0000 (18:02 +0200)] 
runtime(vim): fix incorrect highlighting of User autocmds

There is no pattern after the user event name. The user event name is
the pattern.

closes: #17568

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agopatch 9.1.1466: filetype: not all lex files are recognized v9.1.1466
Eisuke Kawashima [Tue, 17 Jun 2025 18:30:52 +0000 (20:30 +0200)] 
patch 9.1.1466: filetype: not all lex files are recognized

Problem:  filetype: not all lex files are recognized
Solution: detect *.ll as lex, llvm or lifelines filetype, depending on
          the content (Eisuke Kawashima)

closes: #17560

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
6 weeks agopatch 9.1.1465: tabpanel: not correctly drawn with 'equalalways' v9.1.1465
Hirohito Higashi [Mon, 16 Jun 2025 18:26:08 +0000 (20:26 +0200)] 
patch 9.1.1465: tabpanel: not correctly drawn with 'equalalways'

Problem:  tabpanel: not correctly drawn with 'equalalways'
Solution: call win_equal() (Hirohito Higashi)

closes: #17554

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>