]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
3 months agopatch 9.1.1377: patch v9.1.1370 causes some GTK warning messages v9.1.1377
Drew Vogel [Sat, 10 May 2025 12:46:28 +0000 (14:46 +0200)] 
patch 9.1.1377: patch v9.1.1370 causes some GTK warning messages

Problem:  Some GTK3 users experienced unexpectedly small windows at
          startup (after v9.1.1368, @berggeist, Tony Mechelynck)
Solution: Update window manager hints in gui_mch_open, partly revert
          v9.1.1370 (Drew Vogel)

fixes: #17279
closes: #17288

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(lf): use syn iskeyword in syntax script
Andis Spriņķis [Sat, 10 May 2025 12:42:25 +0000 (14:42 +0200)] 
runtime(lf): use syn iskeyword in syntax script

Sets 'syn iskeyword' in syntax/lf.vim to fix the missing lf keyword
highlighting in lines like 'map e :open; open' (first 'open' not
highlighted).

applies PR andis-sprinkis/lf-vim#21 by @joelim-work
closes: andis-sprinkis/lf-vim#14

Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>
Signed-off-by: Andis Spriņķis <andis@sprinkis.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1376: quickfix dummy buffer may remain as dummy buffer v9.1.1376
Sean Dewar [Sat, 10 May 2025 12:33:28 +0000 (14:33 +0200)] 
patch 9.1.1376: quickfix dummy buffer may remain as dummy buffer

Problem:  when failing to wipeout a quickfix dummy buffer, it will
          remain as a dummy buffer, despite being kept.
Solution: clear its dummy BF_DUMMY flag in this case (Sean Dewar).

closes: #17283

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1375: [security]: possible heap UAF with quickfix dummy buffer v9.1.1375
Sean Dewar [Sat, 10 May 2025 12:30:36 +0000 (14:30 +0200)] 
patch 9.1.1375: [security]: possible heap UAF with quickfix dummy buffer

Problem:  heap use-after-free possible when autocommands switch away from the
          quickfix dummy buffer, but leave it open in a window.
Solution: close its windows first before attempting the wipe.
          (Sean Dewar)

related: #17283

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoCI: use deb822 style for llvm source
Philip H. [Sat, 10 May 2025 12:23:36 +0000 (14:23 +0200)] 
CI: use deb822 style for llvm source

closes: #17285

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): remove duplicate sentence in builtin.txt
Christian Brabandt [Fri, 9 May 2025 06:19:51 +0000 (08:19 +0200)] 
runtime(doc): remove duplicate sentence in builtin.txt

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agotypo in comment in gui.c
Christ van Willegen [Thu, 8 May 2025 22:08:01 +0000 (00:08 +0200)] 
typo in comment in gui.c

Problem:  typo in comment in gui.c (after v9.1.1367)
Solution: fix the typo  (Christ van Willegen)

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): update return types for builtin functions
Christian Brabandt [Thu, 8 May 2025 22:03:20 +0000 (00:03 +0200)] 
runtime(doc): update return types for builtin functions

fixes: #17273

credit: Github user @msoyka2024
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1374: completion: 'smartcase' not respected when filtering matches v9.1.1374
Girish Palya [Thu, 8 May 2025 21:28:52 +0000 (23:28 +0200)] 
patch 9.1.1374: completion: 'smartcase' not respected when filtering matches

Problem:  Currently, 'smartcase' is respected when completing keywords
          using <C-N>, <C-P>, <C-X><C-N>, and <C-X><C-P>. However, when
          a user continues typing and the completion menu is filtered
          using cached matches, 'smartcase' is not applied. This leads
          to poor-quality or irrelevant completion suggestions, as shown
          in the example below.
Solution: When filtering cached completion items after typing additional
          characters, apply case-sensitive comparison if 'smartcase' is
          enabled and the typed pattern includes uppercase characters.
          This ensures consistent and expected completion behavior.
          (Girish Palya)

closes: #17271

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1373: 'completeopt' checking logic can be simplified v9.1.1373
glepnir [Thu, 8 May 2025 21:05:10 +0000 (23:05 +0200)] 
patch 9.1.1373: 'completeopt' checking logic can be simplified

Problem:  Flag checking logic uses a temporary variable and multiple
          bitwise operations in insexpand.c
Solution: Consolidate into a single equality check using bitwise OR and
          comparison (glepnir)

closes: #17276

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agogit: ignore more style changes from v9.1.1371 and v9.1.1372
Christian Brabandt [Thu, 8 May 2025 21:01:41 +0000 (23:01 +0200)] 
git: ignore more style changes from v9.1.1371 and v9.1.1372

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1372: style: braces issues in various files v9.1.1372
Hirohito Higashi [Thu, 8 May 2025 20:58:31 +0000 (22:58 +0200)] 
patch 9.1.1372: style: braces issues in various files

Problem:  style: braces issues in various files
Solution: fix style (Hirohito Higashi)

closes: #17277

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1371: style: indentation and brace issues in insexpand.c v9.1.1371
glepnir [Thu, 8 May 2025 20:50:38 +0000 (22:50 +0200)] 
patch 9.1.1371: style: indentation and brace issues in insexpand.c

Problem:  style: indentation issue in insexpand.c
Solution: update style (glepnir)

closes: #17278

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1370: CI Tests favor GTK2 over GTK3 v9.1.1370
Drew Vogel [Wed, 7 May 2025 20:05:17 +0000 (22:05 +0200)] 
patch 9.1.1370: CI Tests favor GTK2 over GTK3

Problem:  CI Tests favor GTK2 over GTK3
Solution: Install GTK3 dependencies and debug packages for CI workflows,
          update ASAN suppression list, update required dependency
          checks for the tests (Drew Vogel)

closes: #17253

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1369: configure still using autoconf 2.71 v9.1.1369
Christian Brabandt [Wed, 7 May 2025 19:44:33 +0000 (21:44 +0200)] 
patch 9.1.1369: configure still using autoconf 2.71

Problem:  configure still using autoconf 2.71
Solution: regenerate with autoconf 2.72

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1368: GTK3 and GTK4 will drop numeric cursor support. v9.1.1368
Drew Vogel [Wed, 7 May 2025 19:32:03 +0000 (21:32 +0200)] 
patch 9.1.1368: GTK3 and GTK4 will drop numeric cursor support.

Problem:  GTK3 and GTK4 will drop numeric cursor support.
Solution: Adopt GTK3 code and use CSS cursor convention (Drew Vogel).

closes: #14610

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1367: too many strlen() calls in gui.c v9.1.1367
John Marriott [Wed, 7 May 2025 17:59:42 +0000 (19:59 +0200)] 
patch 9.1.1367: too many strlen() calls in gui.c

Problem:  too many strlen() calls in gui.c
Solution: refactor gui.c slightly (John Marriott)

This does the following changes:
- use macro STRCMP() instead of strcmp().
- refactor gui_outstr_nowrap() to remove call to STRLEN().
- refactor get_tabline_label() in attempt to simply it. At the same time
  use standard looping construct for iterating over windows in a tab.
  Move variables closer to where they are used. Add check that we don't
  exceed size of NameBuff.
- small optimisation in get_find_dialog_text() to measure the string
  length once.

closes: #17269

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1366: v9.1.1364 unintentionally changed sign.c and sound.c v9.1.1366
Hirohito Higashi [Tue, 6 May 2025 16:13:29 +0000 (18:13 +0200)] 
patch 9.1.1366: v9.1.1364 unintentionally changed sign.c and sound.c

Problem:  v9.1.1364 unintentionally changed sign.c and sound.c
Solution: revert those parts, adjust the test (Hirohito Higashi)

closes: #17264

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(lua): update 'path' option in filetype plugin
Phạm Bình An [Tue, 6 May 2025 16:08:38 +0000 (18:08 +0200)] 
runtime(lua): update 'path' option in filetype plugin

Problem:  Lua doesn't support importing module in path related to current
          file like JS does (https://www.reddit.com/r/lua/comments/wi0bau/whats_the_correct_way_to_run_a_lua_file_that_uses/)
Solution: Remove `.` from Lua buffer-local option `'path'`

closes: #17267

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(sh): Update syntax, match KornShell compound arrays
Doug Kearns [Tue, 6 May 2025 15:59:25 +0000 (17:59 +0200)] 
runtime(sh): Update syntax, match KornShell compound arrays

closes: #17268

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): Tweak documentation style in develop.txt
Hirohito Higashi [Mon, 5 May 2025 18:19:09 +0000 (20:19 +0200)] 
runtime(doc): Tweak documentation style in develop.txt

closes: #17252

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(helptoc): the helptoc package can be improved
Peter Kenny [Mon, 5 May 2025 18:15:39 +0000 (20:15 +0200)] 
runtime(helptoc): the helptoc package can be improved

Adds the following changes:
- New Maintainer: Pete Kenny
- New filetypes supported (asciidoc, html, tex, vim, xhtml)
- improved Markdown support
- Sanitised ToCs and popup presentation
- Configuration improvements and options
- Add helptoc.txt help file

closes: #17255

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(spec): add more local macro names according to rpm 4.20
fundawang [Mon, 5 May 2025 18:12:40 +0000 (20:12 +0200)] 
runtime(spec): add more local macro names according to rpm 4.20

closes: #17258

Signed-off-by: fundawang <fundawang@yeah.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(sh): Update syntax, fix single-quoted strings in parameter expansions
Doug Kearns [Mon, 5 May 2025 18:10:11 +0000 (20:10 +0200)] 
runtime(sh): Update syntax, fix single-quoted strings in parameter expansions

Ignore single-quoted backslash escape sequences in parameter expansions.

\' is not an escaped single quote in ${foo:-'word\'}.

closes: #17261

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(new-tutor): Update Serbian translation of chapter 1
Ivan Pešić [Mon, 5 May 2025 18:07:46 +0000 (20:07 +0200)] 
runtime(new-tutor): Update Serbian translation of chapter 1

closes: #17262

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1365: MS-Windows: compile warnings and too many strlen() calls v9.1.1365
John Marriott [Sun, 4 May 2025 19:35:36 +0000 (21:35 +0200)] 
patch 9.1.1365: MS-Windows: compile warnings and too many strlen() calls

Problem:  MS-Windows: compile warnings and too many strlen() calls  in
          os_mswin.c
Solution: refactor os_mswin.c and fix the warning (John Marriott)

This change does the following:

- Fix compile warnings (clang 20.1.3) in `mch_libcall()`:
```
os_mswin.c:902:21: warning: cast from 'MYSTRPROCSTR' (aka 'char *(*)(char *)') to 'MYSTRPROCINT' (aka 'int (*)(char *)') converts to incompatible function type [-Wcast-function-type-mismatch]`
  902 |                     retval_int = ((MYSTRPROCINT)ProcAdd)((LPSTR)argstring);`
      |                                   ^~~~~~~~~~~~~~~~~~~~~`
os_mswin.c:914:21: warning: cast from 'MYINTPROCSTR' (aka 'char *(*)(int)') to 'MYINTPROCINT' (aka 'int (*)(int)') converts to incompatible function type [-Wcast-function-type-mismatch]`
  914 |                     retval_int = ((MYINTPROCINT)ProcAddI)(argint);`
      |                                   ^~~~~~~~~~~~~~~~~~~~~~`
2 warnings generated.
```

- Refactor `stat_impl()` to remove call to `STRLEN()` (via `STRCAT()`).

- Refactor `Messaging_WndProc()`, `enumWindowsGetServer()` and
  `serverSendToVim()` to remove calls to `STRLEN()`.

- Use `string_T` to store field `name` in `struct charset_pair` and
  `struct quality_pair`. This means we can dispense with some calls to
  `STRLEN()`.

- Use `ARRAY_LENGTH()` macro to determine end of array in
  `charset_id2name()` and `quality_id2name()` to be consistent with the
  rest of the code base.

closes: #17222

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agogit: ignore indentation changes for git-blame (after v9.1.1364)
Christian Brabandt [Sun, 4 May 2025 19:13:47 +0000 (21:13 +0200)] 
git: ignore indentation changes for git-blame (after v9.1.1364)

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1364: style: more indentation issues v9.1.1364
Yegappan Lakshmanan [Sun, 4 May 2025 19:05:51 +0000 (21:05 +0200)] 
patch 9.1.1364: style: more indentation issues

Problem:  style: more indentation issues
Solution: fix indentation style
          (Yegappan Lakshmanan)

closes: #17256

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(vim): Update base-syntax, match quote separated numbers
Doug Kearns [Sun, 4 May 2025 19:01:18 +0000 (21:01 +0200)] 
runtime(vim): Update base-syntax, match quote separated numbers

closes: #17250

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agogit: ignore indentation changes for git-blame (after v9.1.1363)
Christian Brabandt [Sun, 4 May 2025 18:08:45 +0000 (20:08 +0200)] 
git: ignore indentation changes for git-blame (after v9.1.1363)

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1363: style: inconsistent indentation in various files v9.1.1363
Naruhiko Nishino [Sun, 4 May 2025 18:05:47 +0000 (20:05 +0200)] 
patch 9.1.1363: style: inconsistent indentation in various files

Problem:  style: inconsistent indentation in various files
Solution: fix style, updated codestyle test
          (Naruhiko Nishino)

closes: #17254

Signed-off-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1362: Vim9: type ignored when adding tuple to instance list var v9.1.1362
Yegappan Lakshmanan [Sat, 3 May 2025 17:11:45 +0000 (19:11 +0200)] 
patch 9.1.1362: Vim9: type ignored when adding tuple to instance list var

Problem:  Vim9: type ignored when adding tuple to instance list var
          (Lifepillar)
Solution: When getting the typval of class and object member variables,
          set the variable type (Yegappan Lakshmanan)

fixes: #17236
closes: #17244

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(tutor): Add Galician language versions of tutor1 and tutor2
fernandovilarino [Sat, 3 May 2025 17:07:35 +0000 (19:07 +0200)] 
runtime(tutor): Add Galician language versions of tutor1 and tutor2

Both latin-1 and utf-8 versions are included.

closes: #17245

Signed-off-by: fernandovilarino <fernando@cvc.uab.es>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1361: [security]: possible use-after-free when closing a buffer v9.1.1361
Sean Dewar [Sat, 3 May 2025 16:37:27 +0000 (18:37 +0200)] 
patch 9.1.1361: [security]: possible use-after-free when closing a buffer

Problem:  [security]: Possible to open more windows into a closing
          buffer without splitting, bypassing existing "b_locked_split"
          checks and triggering use-after-free
Solution: Disallow switching to a closing buffer. Editing a closing
          buffer (via ":edit", etc.) was fixed in v9.1.0764, but add an
          error message and check just "b_locked_split", as "b_locked"
          is necessary only when the buffer shouldn't be wiped, and may
          be set for buffers that are in-use but not actually closing.
          (Sean Dewar)

closes: #17246

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(abnf): include ABNF filetype plugin
A4-Tacks [Fri, 2 May 2025 13:40:33 +0000 (15:40 +0200)] 
runtime(abnf): include ABNF filetype plugin

closes: #17239

Signed-off-by: A4-Tacks <wdsjxhno1001@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1360: filetype: GNU Radio companion files are not recognized v9.1.1360
zeertzjq [Fri, 2 May 2025 13:35:58 +0000 (15:35 +0200)] 
patch 9.1.1360: filetype: GNU Radio companion files are not recognized

Problem:  filetype: GNU Radio companion files are not recognized
Solution: detect *.grc files as xml or yaml filetype depending on the
          first line (zeertzjq).

Ref:
- https://wiki.gnuradio.org/index.php/XML_GRC
- https://wiki.gnuradio.org/index.php/YAML_GRC

closes: #17241

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1359: filetype: GNU Radio config files are not recognized v9.1.1359
zeertzjq [Fri, 2 May 2025 13:32:23 +0000 (15:32 +0200)] 
patch 9.1.1359: filetype: GNU Radio config files are not recognized

Problem:  filetype: GNU Radio config files are not recognized.
Solution: detect GNU Radio config files as confini filetype.  Only
          allow '#' as start of comment in confini syntax (zeertzjq).

Ref:
- https://wiki.gnuradio.org/index.php/Configuration_Files

closes: #17242

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1358: if_lua: compile warnings with gcc15 v9.1.1358
lilydjwg [Fri, 2 May 2025 13:17:14 +0000 (15:17 +0200)] 
patch 9.1.1358: if_lua: compile warnings with gcc15

Problem:  if_lua: compile warnings with gcc15
Solution: update function prototypes (lilydjwg)

see also https://github.com/ruby/ruby/pull/13202.

closes: #17243

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(vim): Update base-syntax, improve enum highlighting
Doug Kearns [Thu, 1 May 2025 15:43:17 +0000 (17:43 +0200)] 
runtime(vim): Update base-syntax, improve enum highlighting

Match enum values and missing class keywords.

fixes: #15970

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): update example ctags program and links
Phạm Bình An [Thu, 1 May 2025 15:40:15 +0000 (17:40 +0200)] 
runtime(doc): update example ctags program and links

- :helptags is also a tags generating program, it deserves mentioning
- JTags seems too dead: its website has been sold, the source, binary
  can't be found anywhere.
- update link of ptags

closes: #17233

Signed-off-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1357: Vim incorrectly escapes tags with "[" in a help buffer v9.1.1357
Phạm Bình An [Thu, 1 May 2025 15:30:58 +0000 (17:30 +0200)] 
patch 9.1.1357: Vim incorrectly escapes tags with "[" in a help buffer

Problem:  Vim incorrectly escapes tags containing "[" in a help buffer
Solution: check if the buffer has the "help" filetype set, instead of
          already being a help buffer (Phạm Bình An)

fixes: #17224
closes: #17232

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1356: Vim9: crash when unletting variable v9.1.1356
Hirohito Higashi [Thu, 1 May 2025 06:56:39 +0000 (08:56 +0200)] 
patch 9.1.1356: Vim9: crash when unletting variable

Problem:  Vim9: crash when unletting variable
Solution: fix crash, allow to use :unlet
          (Hirohito Higashi)

closes: #17226

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(sh): Update syntax, highlight escaped chars in test expressions
Doug Kearns [Wed, 30 Apr 2025 18:04:28 +0000 (20:04 +0200)] 
runtime(sh): Update syntax, highlight escaped chars in test expressions

Highlight escape characters in unquoted test expression operands.

E.g., [[ foo == \[bar\] ]]

fixes #17221

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): document that :b cannot handle buffer names starting with "+"
Christian Brabandt [Wed, 30 Apr 2025 17:54:52 +0000 (19:54 +0200)] 
runtime(doc): document that :b cannot handle buffer names starting with "+"

closes: #17229

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): clarify the use of 'tagfunc', update a comment in tags.c
Christian Brabandt [Wed, 30 Apr 2025 17:31:58 +0000 (19:31 +0200)] 
runtime(doc): clarify the use of 'tagfunc', update a comment in tags.c

related: #17228

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): tweak documentation style in options.txt
Hirohito Higashi [Wed, 30 Apr 2025 17:12:37 +0000 (19:12 +0200)] 
runtime(doc): tweak documentation style in options.txt

closes: #17229

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1355: The pum_redraw() function is too complex v9.1.1355
glepnir [Tue, 29 Apr 2025 16:27:05 +0000 (18:27 +0200)] 
patch 9.1.1355: The pum_redraw() function is too complex

Problem:  The pum_redraw function is too complex and difficult to
          maintain with nested loops and mixed responsibilities handling
          both RTL and LTR text rendering.
Solution: Extracted core rendering logic into dedicated helper functions
          (pum_display_rtl_text, pum_display_ltr_text, pum_draw_scrollbar,
          pum_process_item) while preserving the original behavior. This
          improves code readability and maintainability (glepnir).

closes: #17204

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1354: tests: Test_terminalwinscroll_topline() fails on Windows v9.1.1354
Christian Brabandt [Tue, 29 Apr 2025 16:21:31 +0000 (18:21 +0200)] 
patch 9.1.1354: tests: Test_terminalwinscroll_topline() fails on Windows

Problem:  tests: Test_terminalwinscroll_topline() fails on Windows
          (after v9.1.1348)
Solution: instead of disabling it in Github Actions runners, disable it
          for all Windows runs

related: #17196

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1353: missing change from v9.1.1350 v9.1.1353
Girish Palya [Mon, 28 Apr 2025 16:29:52 +0000 (18:29 +0200)] 
patch 9.1.1353: missing change from v9.1.1350

Problem:  missing change from v9.1.1350
Solution: update the test Test_CmdlineTrigger() (Girish Palya)

related: #17217

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agogit: ignore reformatting commit for git-blame (after v9.1.1352)
Christian Brabandt [Mon, 28 Apr 2025 16:09:49 +0000 (18:09 +0200)] 
git: ignore reformatting commit for git-blame (after v9.1.1352)

related: #17219

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1352: style: inconsistent indent in insexpand.c v9.1.1352
Hirohito Higashi [Mon, 28 Apr 2025 16:07:02 +0000 (18:07 +0200)] 
patch 9.1.1352: style: inconsistent indent in insexpand.c

Problem:  style: inconsistent indent in insexpand.c
Solution: fix indentation (Hirohito Higashi)

closes: #17219

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1351: Return value of getcmdline() inconsistent in CmdlineLeavePre v9.1.1351
zeertzjq [Mon, 28 Apr 2025 16:04:00 +0000 (18:04 +0200)] 
patch 9.1.1351: Return value of getcmdline() inconsistent in CmdlineLeavePre

Problem:  Return value of getcmdline() inconsistent in CmdlineLeavePre
          when leaving cmdline in different ways (after v9.1.1329).
Solution: Trigger CmdlineLeavePre before calling abandon_cmdline() so
          that getcmdline() can return the command line (zeertzjq).

closes: #17218

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1350: tests: typo in Test_CmdlineLeavePre_cabbr() v9.1.1350
Girish Palya [Mon, 28 Apr 2025 16:00:40 +0000 (18:00 +0200)] 
patch 9.1.1350: tests: typo in Test_CmdlineLeavePre_cabbr()

Problem:  tests: typo in Test_CmdlineLeavePre_cabbr()
          (after v9.1.1349)
Solution: fix typo, disable failing test on Windows for now
          (Girish Palya)

closes: #17217

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(java): Consent to HTML tags folding in Javadoc comments
Aliaksei Budavei [Mon, 28 Apr 2025 15:58:22 +0000 (17:58 +0200)] 
runtime(java): Consent to HTML tags folding in Javadoc comments

HTML tags in Javadoc comments can additionally be folded
after applying
------------------------------------------------------------
let g:html_syntax_folding = 1
set foldmethod=syntax
------------------------------------------------------------

and giving explicit consent with
------------------------------------------------------------
let g:java_consent_to_html_syntax_folding = 1
------------------------------------------------------------

Do not default to this kind of folding unless ALL start tags
and optional end tags are balanced in Javadoc comments;
otherwise, put up with creating runaway folds that break
syntax highlighting.

resolves: zzzyxwvut/java-vim#8.
closes: #17216

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(syntax-tests): Regenerate changed syntax test pages for vim
Aliaksei Budavei [Mon, 28 Apr 2025 15:55:05 +0000 (17:55 +0200)] 
runtime(syntax-tests): Regenerate changed syntax test pages for vim

See #17213 (v9.1.1348~1).

closes: #17215

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1349: CmdlineLeavePre may trigger twice v9.1.1349
Girish Palya [Sun, 27 Apr 2025 17:28:06 +0000 (19:28 +0200)] 
patch 9.1.1349: CmdlineLeavePre may trigger twice

Problem:  CmdlineLeavePre may trigger twice
          (after v9.1.1329)
Solution: check that the key was typed, trigger it when it wasn't before
          (Girish Palya)

There are two problems:
- CmdlineLeavePre may be triggered twice when a cabbr is present.
- CmdlineLeavePre fails to trigger when exiting the command-line via
  <Backspace>.

Check if the Carriage Return (Enter) key was actually typed.
Trigger the event when the command-line is exited using Backspace and
other keys.

closes: #17214

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(vim): Update base-syntax, fix inline Vim9 dict comments at SOL
Doug Kearns [Sun, 27 Apr 2025 17:17:06 +0000 (19:17 +0200)] 
runtime(vim): Update base-syntax, fix inline Vim9 dict comments at SOL

Match Vim9 comments at start-of-line (no leading whitespace) in
dictionaries, lists and parenthesised expressions and argument lists.

Addresses https://github.com/vim/vim/pull/14975#issuecomment-2832643115

Report and fix by Aliaksei Budavei.

closes: #17211

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1348: still E315 with the terminal feature v9.1.1348
Hirohito Higashi [Sun, 27 Apr 2025 13:36:43 +0000 (15:36 +0200)] 
patch 9.1.1348: still E315 with the terminal feature

Problem:  still E315 with the terminal feature
          (user202729)
Solution: call update_topline() in limit_scrollback()
          (Hirohito Higashi)

fixes: #17195
closes: #17196

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): Fix notation of "Vim script" and "Vim9 script"
Hirohito Higashi [Sun, 27 Apr 2025 13:28:30 +0000 (15:28 +0200)] 
runtime(doc): Fix notation of "Vim script" and "Vim9 script"

closes: #17213

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1347: small problems with gui_w32.c v9.1.1347
John Marriott [Sun, 27 Apr 2025 13:05:06 +0000 (15:05 +0200)] 
patch 9.1.1347: small problems with gui_w32.c

Problem:  small problems with gui_w32.c
Solution: fix compile warnings and refactor code (John Marriott)

Compiler (clang v20.1.3) warnings on `_OnMenuSelect()` and
`_OnGetDpiScaledSize()`:
```
clang -c -I. -Iproto -DWIN32 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601
-DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -Wall -Wno-deprecated-declarations -D_REENTRANT -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1 -Wall -Wextra -Wshadow -Wstrict-prototypes
-Wmissing-prototypes -Wno-deprecated-declarations
-Wno-error=missing-field-initializers -Werror=uninitialized
-Wunused-but-set-variable -DEXITFREE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD
gui_w32.c -o gobjx86-64/gui_w32.o
gui_w32.c:5038:55: warning: comparison of integers of different signs:
'UINT' (aka 'unsigned int') and 'int' [-Wsign-compare]
 5038 |                 && GetMenuState(s_menuBar, pMenu->id, MF_BYCOMMAND) != -1)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
gui_w32.c:5054:26: warning: unused parameter 'hwnd' [-Wunused-parameter]
 5054 | _OnGetDpiScaledSize(HWND hwnd, UINT dpi, SIZE *size)
      |                          ^
2 warnings generated.
```

This commit contains the following changes:
- Fixes Warning 1:
  The prototype of `GetMenuState()` says that it returns a UINT, but
  returns -1 on failure. Huh?!?

  Also, Microsoft says that this function has been superseded (see
  https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmenustate)
  and replaced by `GetMenuItemInfo()`. Both of these functions have a
  minimum support of Windows 2000.
  Therefore in `_OnMenuSelect()`, replace the call to `GetMenuState()`
  with `GetMenuItemInfo()`.

- Fixes Warning 2:
  Add `UNUSED` to the definition of `_OnGetDpiScaledSize()`.

- Simplify `logfont2name()`.
- Add small optimisations in `_OnNotify()` and `gui_mch_do_spawn()`.
- Add out-of-memory check in `gui_mch_do_spawn()`.
- Code cosmetics (see definitions of `process_message_usual_key_classic()`
  and `process_message()`).

closes: #17208

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): clarify complete_match() and 'isexpand' option
glepnir [Sun, 27 Apr 2025 12:59:17 +0000 (14:59 +0200)] 
runtime(doc): clarify complete_match() and 'isexpand' option

clarify complete_match() documentation to better explain its backward
search behavior, argument handling, and return value format and add an
example of isexpand

closes: #17212

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(vim): Update base-syntax, match continued strings and tail comments
Doug Kearns [Sat, 26 Apr 2025 18:14:15 +0000 (20:14 +0200)] 
runtime(vim): Update base-syntax, match continued strings and tail comments

Continued strings are currently only matched after operators, in
parenthesised expressions and in function call argument lists.

closes: #14975

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): tagfunc should refer to 'complete' option
Christian Brabandt [Sat, 26 Apr 2025 18:06:41 +0000 (20:06 +0200)] 
runtime(doc): tagfunc should refer to 'complete' option

fixes: #17205

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1346: missing out-of-memory check in textformat.c v9.1.1346
John Marriott [Fri, 25 Apr 2025 17:14:38 +0000 (19:14 +0200)] 
patch 9.1.1346: missing out-of-memory check in textformat.c

Problem:  missing out-of-memory check in textformat.c
Solution: add out-of-memory check, add small optimizations to
          internal_format() and same_leader() (John Marriott)

closes: #17200

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1345: tests: Test_xxd_color2() test failure dump diff is misleading v9.1.1345
Drew Vogel [Fri, 25 Apr 2025 17:06:53 +0000 (19:06 +0200)] 
patch 9.1.1345: tests: Test_xxd_color2() test failure dump diff is misleading

Problem:  tests: Test_xxd_color2() test failure dump diff is misleading
Solution: Ensure the reference dump and the test dump are both processed the
          same (Drew Vogel).

Background:

Commit b6dc76b6fd23e571d309064b795847ee9ffc7689 sought to make the xxd
screendump tests compatible with non-standard `XXD` overrides. It provides a
vim script that matches a very general `xxd` command pattern but then also
removed the matching line from the reference dump. This second step was
unnecessary because `VerifyScreenDump()` runs the associated vim script against
both the reference dump and the test dump.

Problem Details:

As part of some unrelated work, the GUI tests were failing with a window size 1
column too narrow. The screendumps in `Test_xxd_color2` were failing as a
result. When I loaded the diff using `term_dumpdiff()` the associated vim
scripts are not run. As a result, the test dump contained the `xxd` invocation
on line 1 while reference dump did not. This throws the diff off, obscuring the
true issue of the GUI window being too narrow.

Verification:

In addition to the test suite, locally I've tried to recreate the issue being
fixed in b6dc76b6fd23e571d309064b795847ee9ffc7689. Setting a very non-standard
`XXD` path, this test still passes:

```
XXD=/home/dvogel/opt/vim/bin/xxd TEST_FILTER=Test_xxd_color2 TERM=xterm-color make test_xxd
rm -f test_xxd.res test.log messages starttime
if test -n "${ASAN_OPTIONS}"; then \
   XXD=../xxd/xxd; export XXD; ASAN_OPTIONS="${ASAN_OPTIONS}_test_xxd" \
UBSAN_OPTIONS="${UBSAN_OPTIONS}_test_xxd" VIMRUNTIME=../../runtime  ../vim -f \
-u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S \
runtest.vim test_xxd.vim ; \
fi

From test_xxd.vim:
Executed Test_xxd_color2()               in   0.066049 seconds
Filtered 17 tests with $TEST_FILTER and $TEST_SKIP_PAT
Executed 1 test                          in   0.096862 seconds
```

closes: #17202

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(debversions): Add questing (25.10) as Ubuntu release name
James McCoy [Fri, 25 Apr 2025 17:04:20 +0000 (19:04 +0200)] 
runtime(debversions): Add questing (25.10) as Ubuntu release name

closes: #17201

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1344: double free in f_complete_match() (after v9.1.1341) v9.1.1344
Christian Brabandt [Fri, 25 Apr 2025 17:01:06 +0000 (19:01 +0200)] 
patch 9.1.1344: double free in f_complete_match() (after v9.1.1341)

Problem:  double free in f_complete_match() (after v9.1.1341)
Solution: remove additional free of trig pointer, correctly free
          regmatch.regprog and before_cursor in the error case

closes: #17203

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1343: filetype: IPython files are not recognized v9.1.1343
Christian Brabandt [Thu, 24 Apr 2025 20:34:46 +0000 (22:34 +0200)] 
patch 9.1.1343: filetype: IPython files are not recognized

Problem:  filetype: IPython files are not recognized
          (user202729)
Solution: detect *.ipy files as python filetype

fixes: #17163

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(groff,nroff): improve ftplugin
Eisuke Kawashima [Thu, 24 Apr 2025 20:26:02 +0000 (22:26 +0200)] 
runtime(groff,nroff): improve ftplugin

- set options in ftplugin but not in syntax
- implement ftplugin/groff.vim (wrapper of ftplugin/nroff.vim)

closes: #17174

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1342: Shebang filetype detection can be improved v9.1.1342
Eisuke Kawashima [Thu, 24 Apr 2025 20:03:21 +0000 (22:03 +0200)] 
patch 9.1.1342: Shebang filetype detection can be improved

Problem:  Shebang filetype detection can be improved
Solution: Improve detection logic (Eisuke Kawashima)

Vim does not correctly detect filetype from
  - `#!/usr/bin/env --split-string=awk -f`
  - `#!/usr/bin/env -S -i awk -f`
  - `#!/usr/bin/env -S VAR= awk -f`
So update the current detection logic to detect those cases.

closes: #17199

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1341: cannot define completion triggers v9.1.1341
glepnir [Thu, 24 Apr 2025 19:48:35 +0000 (21:48 +0200)] 
patch 9.1.1341: cannot define completion triggers

Problem:  Cannot define completion triggers and act upon it
Solution: add the new option 'isexpand' and add the complete_match()
          function to return the completion matches according to the
          'isexpand' setting (glepnir)

Currently, completion trigger position is determined solely by the
'iskeyword' pattern (\k\+$), which causes issues when users need
different completion behaviors - such as triggering after '/' for
comments or '.' for methods. Modifying 'iskeyword' to include these
characters has undesirable side effects on other Vim functionality that
relies on keyword definitions.

Introduce a new buffer-local option 'isexpand' that allows specifying
different completion triggers and add the complete_match() function that
finds the appropriate start column for completion based on these
triggers, scanning backwards from cursor position.

This separation of concerns allows customized completion behavior
without affecting iskeyword-dependent features. The option's
buffer-local nature enables per-filetype completion triggers.

closes: #16716

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(gleam): update filetype plugin, include new compiler and syntax script
Kirill Morozov [Thu, 24 Apr 2025 19:28:56 +0000 (21:28 +0200)] 
runtime(gleam): update filetype plugin, include new compiler and syntax script

closes: #17172

Signed-off-by: Kirill Morozov <mail2kirill@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1340: cannot complete :filetype arguments v9.1.1340
Christian Brabandt [Wed, 23 Apr 2025 19:04:24 +0000 (21:04 +0200)] 
patch 9.1.1340: cannot complete :filetype arguments

Problem:  cannot complete :filetype arguments (Phạm Bình An)
Solution: add :filetype ex command completion, add "filetypecmd"
          completion type for getcompletion()

fixes: #17165
closes: #17167

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1339: missing out-of-memory checks for enc_to_utf16()/utf16_to_enc() v9.1.1339
John Marriott [Wed, 23 Apr 2025 18:56:08 +0000 (20:56 +0200)] 
patch 9.1.1339: missing out-of-memory checks for enc_to_utf16()/utf16_to_enc()

Problem:  missing out-of-memory checks for enc_to_utf16() and
          utf16_to_enc()
Solution: Add out-of-memory checks and fix a few other minor issues
          (John Marriott)

This change does:
-  add missing out-of-memory checks for enc_to_utf16() and
   utf16_to_enc()
-  add a small optimisation in mch_errmsg_c() and mch_msg_c() (in
   message.c) to only call STRLEN() if needed.
-  fix a memory leak in winpty_term_and_job_init() (in terminal.c).

closes: #17191

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1338: Calling expand() interferes with cmdcomplete_info() v9.1.1338
zeertzjq [Wed, 23 Apr 2025 18:50:23 +0000 (20:50 +0200)] 
patch 9.1.1338: Calling expand() interferes with cmdcomplete_info()

Problem:  Calling expand() interferes with cmdcomplete_info()
          (after 9.1.1329).
Solution: Only clear cmdline_orig when starting/ending cmdline mode
          (zeertzjq).

closes: #17192

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1337: Undo corrupted with 'completeopt' "preinsert" when switching buffer v9.1.1337
zeertzjq [Wed, 23 Apr 2025 18:46:35 +0000 (20:46 +0200)] 
patch 9.1.1337: Undo corrupted with 'completeopt' "preinsert" when switching buffer

Problem:  Undo corrupted with 'completeopt' "preinsert" when switching
          buffer or window.
Solution: Do not delete preinsert text when switching buffer or window.
          (zeertzjq)

related: neovim/neovim#33581
closes: #17193

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(yaml): fix wrong order of undo_ftplugin suboptions
Vincent Law [Tue, 22 Apr 2025 18:35:11 +0000 (20:35 +0200)] 
runtime(yaml): fix wrong order of undo_ftplugin suboptions

This commit fixes the following error message:
```
Compiler not supported: make inc< sw< sts<
```

1. orginal value: `setl com< cms< et< fo<| compiler make inc< sw< sts<`
2. correct value: `setl com< cms< et< fo< inc< sw< sts< | compiler make`

While at it, let's also document the g:yaml_recommended_style variable.

closes: #17179

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Vincent Law <vlaw@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(make): do not automatically indent after a special target
Eisuke Kawashima [Tue, 22 Apr 2025 18:20:46 +0000 (20:20 +0200)] 
runtime(make): do not automatically indent after a special target

prevent indentation if the previous line starts with e.g. `.PHONY:`

closes: #17183

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1336: comment plugin does not support case-insensitive 'commentstring' v9.1.1336
Maxim Kim [Tue, 22 Apr 2025 18:11:05 +0000 (20:11 +0200)] 
patch 9.1.1336: comment plugin does not support case-insensitive 'commentstring'

Problem:  comment plugin does not support case-insensitive
          'commentstring' (char101)
Solution: Use pattern '\c' to make the regex case-insensitive
          (Maxim Kim)

fixes: #17184
closes: #17186

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1335: Coverity complains about Null pointer dereferences v9.1.1335
Christian Brabandt [Tue, 22 Apr 2025 18:06:53 +0000 (20:06 +0200)] 
patch 9.1.1335: Coverity complains about Null pointer dereferences

Problem:  Coverity complains about Null pointer dereferences
Solution: before accessing ccline->cmdbuff check that ccline is not NULL

Fixes: Coverity issue 1646601
closes: #17189

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1334: Coverity complains about unchecked return value v9.1.1334
Christian Brabandt [Tue, 22 Apr 2025 18:04:28 +0000 (20:04 +0200)] 
patch 9.1.1334: Coverity complains about unchecked return value

Problem:  Coverity complains about unchecked return value
Solution: cast return value to (void)

Fixes: Coverity issue 1646574
related: #17189

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1333: Coverity: complains about unutilized variable v9.1.1333
Christian Brabandt [Tue, 22 Apr 2025 18:01:04 +0000 (20:01 +0200)] 
patch 9.1.1333: Coverity: complains about unutilized variable

Problem:  Coverity: complains about unutilized variable
Solution: initialize typval properly
          (author)

Fixes: Coverity issue: 1646573
       tmp.v_lock is left unitialized
related: #17189

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1332: Vim9: segfault when using super within a lambda v9.1.1332
Yegappan Lakshmanan [Tue, 22 Apr 2025 17:55:38 +0000 (19:55 +0200)] 
patch 9.1.1332: Vim9: segfault when using super within a lambda

Problem:  Vim9: segfault when using super within a lambda
          (lifepillar)
Solution: inherit the class from the current function
          (Yegappan Lakshmanan)

fixes: #17166
closes: #17185

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1331: Leaking memory with cmdcomplete() v9.1.1331
Girish Palya [Tue, 22 Apr 2025 17:52:16 +0000 (19:52 +0200)] 
patch 9.1.1331: Leaking memory with cmdcomplete()

Problem:  Leaking memory with cmdcomplete()
          (zeertzjq, after v9.1.1329)
Solution: free the memory (Girish Palya)

closes: #17190

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(vim): Update base-syntax, improve :autocmd highlighting
Doug Kearns [Tue, 22 Apr 2025 17:48:13 +0000 (19:48 +0200)] 
runtime(vim): Update base-syntax, improve :autocmd highlighting

- Match full :autocmd, :doautocmd and :doautoall commands.
- Add filename pattern (wildcard) highlighting.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): update documentation
Hirohito Higashi [Mon, 21 Apr 2025 17:39:15 +0000 (19:39 +0200)] 
runtime(doc): update documentation

closes: #17180

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): clarify return type for findfile()/finddir()
Christian Brabandt [Mon, 21 Apr 2025 09:31:58 +0000 (11:31 +0200)] 
runtime(doc): clarify return type for findfile()/finddir()

closes: #17171

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1330: may receive E315 in terminal v9.1.1330
Hirohito Higashi [Mon, 21 Apr 2025 09:23:12 +0000 (11:23 +0200)] 
patch 9.1.1330: may receive E315 in terminal

Problem:  may receive E315 in terminal
Solution: call check_cursor() (Hirohito Higashi)

fixes: #16024
fixes: #16211
fixes: #17099
closes: #17170

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoCI: add sway compositor to CI tests, to prepare for better Wayland testing
Foxe Chen [Mon, 21 Apr 2025 09:20:44 +0000 (11:20 +0200)] 
CI: add sway compositor to CI tests, to prepare for better Wayland testing

closes: #17162

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1329: cannot get information about command line completion v9.1.1329
Girish Palya [Mon, 21 Apr 2025 09:12:41 +0000 (11:12 +0200)] 
patch 9.1.1329: cannot get information about command line completion

Problem:  cannot get information about command line completion
Solution: add CmdlineLeavePre autocommand and cmdcomplete_info() Vim
          script function (Girish Palya)

This commit introduces two features to improve introspection and control
over command-line completion in Vim:

- Add CmdlineLeavePre autocmd event:

  A new event triggered just before leaving the command line and before
  CmdlineLeave. It allows capturing completion-related state that is
  otherwise cleared by the time CmdlineLeave fires.

- Add cmdcomplete_info() Vim script function:

  Returns a Dictionary with details about the current command-line
  completion state.

These are similar in spirit to InsertLeavePre and complete_info(),
but focused on command-line mode.

**Use case:**

In [[PR #16759](https://github.com/vim/vim/pull/16759)], two examples
demonstrate command-line completion: one for live grep, and another for
fuzzy file finding. However, both examples share two key limitations:

1. **Broken history recall (`<Up>`)**
   When selecting a completion item via `<Tab>` or `<C-n>`, the original
pattern used for searching (e.g., a regex or fuzzy string) is
overwritten in the command-line history. This makes it impossible to
recall the original query later.
   This is especially problematic for interactive grep workflows, where
it’s useful to recall a previous search and simply select a different
match from the menu.

2. **Lack of default selection on `<CR>`**
   Often, it’s helpful to allow `<CR>` (Enter) to accept the first match
in the completion list, even when no item is explicitly selected. This
behavior is particularly useful in fuzzy file finding.

----
Below are the updated examples incorporating these improvements:

**Live grep, fuzzy find file, fuzzy find buffer:**

```vim
command! -nargs=+ -complete=customlist,GrepComplete Grep VisitFile()
def GrepComplete(arglead: string, cmdline: string, cursorpos: number):
list<any>
    return arglead->len() > 1 ? systemlist($'grep -REIHns "{arglead}"' ..
       ' --exclude-dir=.git --exclude=".*" --exclude="tags" --exclude="*.swp"') : []
enddef
def VisitFile()
    if (selected_match != null_string)
        var qfitem = getqflist({lines: [selected_match]}).items[0]
        if qfitem->has_key('bufnr') && qfitem.lnum > 0
            var pos = qfitem.vcol > 0 ? 'setcharpos' : 'setpos'
            exec $':b +call\ {pos}(".",\ [0,\ {qfitem.lnum},\ {qfitem.col},\ 0]) {qfitem.bufnr}'
            setbufvar(qfitem.bufnr, '&buflisted', 1)
        endif
    endif
enddef
nnoremap <leader>g :Grep<space>
nnoremap <leader>G :Grep <c-r>=expand("<cword>")<cr>
command! -nargs=* -complete=customlist,FuzzyFind Find
execute(selected_match != '' ? $'edit {selected_match}' : '')
var allfiles: list<string>
autocmd CmdlineEnter : allfiles = null_list
def FuzzyFind(arglead: string, _: string, _: number): list<string>
    if allfiles == null_list
        allfiles = systemlist($'find {get(g:, "fzfind_root", ".")} \! \(
-path "*/.git" -prune -o -name "*.swp" \) -type f -follow')
    endif
    return arglead == '' ? allfiles : allfiles->matchfuzzy(arglead)
enddef
nnoremap <leader><space> :<c-r>=execute('let
fzfind_root="."')\|''<cr>Find<space><c-@>
nnoremap <leader>fv :<c-r>=execute('let
fzfind_root="$HOME/.vim"')\|''<cr>Find<space><c-@>
nnoremap <leader>fV :<c-r>=execute('let
fzfind_root="$VIMRUNTIME"')\|''<cr>Find<space><c-@>
command! -nargs=* -complete=customlist,FuzzyBuffer Buffer execute('b '
.. selected_match->matchstr('\d\+'))
def FuzzyBuffer(arglead: string, _: string, _: number): list<string>
    var bufs = execute('buffers', 'silent!')->split("\n")
    var altbuf = bufs->indexof((_, v) => v =~ '^\s*\d\+\s\+#')
    if altbuf != -1
        [bufs[0], bufs[altbuf]] = [bufs[altbuf], bufs[0]]
    endif
    return arglead == '' ? bufs : bufs->matchfuzzy(arglead)
enddef
nnoremap <leader><bs> :Buffer <c-@>
var selected_match = null_string
autocmd CmdlineLeavePre : SelectItem()
def SelectItem()
    selected_match = ''
    if getcmdline() =~ '^\s*\%(Grep\|Find\|Buffer\)\s'
        var info = cmdcomplete_info()
        if info != {} && info.pum_visible && !info.matches->empty()
            selected_match = info.selected != -1 ? info.matches[info.selected] : info.matches[0]
            setcmdline(info.cmdline_orig). # Preserve search pattern in history
        endif
    endif
enddef
```

**Auto-completion snippet:**

```vim
set wim=noselect:lastused,full wop=pum wcm=<C-@> wmnu
autocmd CmdlineChanged : CmdComplete()
def CmdComplete()
    var [cmdline, curpos] = [getcmdline(), getcmdpos()]
    if getchar(1, {number: true}) == 0  # Typehead is empty (no more pasted input)
            && !pumvisible() && curpos == cmdline->len() + 1
            && cmdline =~ '\%(\w\|[*/:.-]\)$' && cmdline !~ '^\d\+$'  # Reduce noise
        feedkeys("\<C-@>", "ti")
        SkipCmdlineChanged()  # Suppress redundant completion attempts
        # Remove <C-@> that get inserted when no items are available
        timer_start(0, (_) => getcmdline()->substitute('\%x00', '', 'g')->setcmdline())
    endif
enddef
cnoremap <expr> <up> SkipCmdlineChanged("\<up>")
cnoremap <expr> <down> SkipCmdlineChanged("\<down>")
autocmd CmdlineEnter : set bo+=error
autocmd CmdlineLeave : set bo-=error
def SkipCmdlineChanged(key = ''): string
    set ei+=CmdlineChanged
    timer_start(0, (_) => execute('set ei-=CmdlineChanged'))
    return key != '' ? ((pumvisible() ? "\<c-e>" : '') .. key) : ''
enddef
```

These customizable snippets can serve as *lightweight* and *native*
alternatives to picker plugins like **FZF** or **Telescope** for common,
everyday workflows. Also, live grep snippet can replace **cscope**
without the overhead of building its database.

closes: #17115

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1328: too many strlen() calls in indent.c v9.1.1328
John Marriott [Mon, 21 Apr 2025 09:01:53 +0000 (11:01 +0200)] 
patch 9.1.1328: too many strlen() calls in indent.c

Problem:  too many strlen() calls in indent.c
Solution: refactor indent.c slightly and remove strlen() calls
          (John Marriott)

closes: #17156

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1327: filetype: nroff detection can be improved v9.1.1327
Eisuke Kawashima [Mon, 21 Apr 2025 08:51:05 +0000 (10:51 +0200)] 
patch 9.1.1327: filetype: nroff detection can be improved

Problem:  filetype: nroff detection can be improved
Solution: improve nroff detection (Eisuke Kawashima)

- explicitly check roff comments and macros typically found in manpages
- do not try to detect alphabetically-sectioned files, except for n, as
  nroff
    - l: > 'l' happens to be a section for historical reasons
         <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391977>
    - n: e.g. /usr/share/man/mann/Tcl.n.gz
    - o: unsure (perhaps fedora-specific)
    - p: unsure (perhaps fedora-specific)

closes: #17160

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): cross-link :| meaning :p and explain E749
D. Ben Knoble [Mon, 21 Apr 2025 08:19:51 +0000 (10:19 +0200)] 
runtime(doc): cross-link :| meaning :p and explain E749

E749 is given when :print (with any range) is issued on an empty buffer,
like the one you get with :new or :enew. Furthermore, due to Vi
compatibility :| is a synonym.

As a result, mappings intended to include a <bar> separator (esp. in the
case of boolean or "||") between commands can generate E749 on startup
when placed in a vimrc if the bars are not properly encoded or escaped.
[1]. Document this failure mode and synonym near the generated error,
and cross link with :help :bar. Note that one must read or scroll quite
a bit to find the mention of :| behaving like :print!

[1]: https://vi.stackexchange.com/q/46625/10604

closes: #17173

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): style: clarify to prefer 2 spaces after a sentence
Christian Brabandt [Mon, 21 Apr 2025 08:15:02 +0000 (10:15 +0200)] 
runtime(doc): style: clarify to prefer 2 spaces after a sentence

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(pov): deprecate `#render` and `#statistics` in syntax script
Eisuke Kawashima [Mon, 21 Apr 2025 07:45:39 +0000 (09:45 +0200)] 
runtime(pov): deprecate `#render` and `#statistics` in syntax script

- 3.1g: active
  https://www.povray.org/ftp/pub/povray/Old-Versions/Official-3.1g/Docs/povuser.pdf#page=172
- 3.5 or later: deprecated
  https://www.povray.org/ftp/pub/povray/Old-Versions/Official-3.5/Linux/povlinux.tgz
  ─ povray-3.50c/html/povdoc_172.html
  - https://www.povray.org/documentation/3.7.0/r3_3.html#r3_3_2_7_1

closes: #17177

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1326: invalid cursor position after 'tagfunc' v9.1.1326
Christian Brabandt [Sun, 20 Apr 2025 16:21:35 +0000 (18:21 +0200)] 
patch 9.1.1326: invalid cursor position after 'tagfunc'

Problem:  invalid cursor position after 'tagfunc'
          (gandalf4a)
Solution: call check_cursor() after executing the 'tagfunc'

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(keymaps): update Brazilian keymaps
LuMarquesIlva [Sun, 20 Apr 2025 15:10:20 +0000 (17:10 +0200)] 
runtime(keymaps): update Brazilian keymaps

closes: #17161

Signed-off-by: LuMarquesIlva <luismarques0504@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agopatch 9.1.1325: tests: not checking error numbers properly v9.1.1325
zeertzjq [Sun, 20 Apr 2025 08:21:18 +0000 (10:21 +0200)] 
patch 9.1.1325: tests: not checking error numbers properly

Problem:  tests: not checking error numbers properly.
Solution: Add a trailing comma to avoid matching a different error
          number with the same prefix (zeertzjq)

closes: #17159

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(doc): clarify 'includeexpr' is not used for <cfile>
Christian Brabandt [Sat, 19 Apr 2025 09:54:08 +0000 (11:54 +0200)] 
runtime(doc): clarify 'includeexpr' is not used for <cfile>

fixes: #17139

Signed-off-by: Christian Brabandt <cb@256bit.org>
3 months agoruntime(filetype): improve *.h filetype detection
Amelia Clarke [Sat, 19 Apr 2025 09:48:10 +0000 (11:48 +0200)] 
runtime(filetype): improve *.h filetype detection

This commit changes *.h files to default to C (instead of C++), and
deprecates the existing `g:c_syntax_for_h` and `g:ch_syntax_for_h`
variables in favor of a unified `g:filetype_h`, like is used for other
ambiguous file extensions.

closes: #17135

Signed-off-by: Amelia Clarke <selene@perilune.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>