0
0
mirror of https://github.com/vim/vim.git synced 2025-08-26 20:03:41 -04:00

21853 Commits

Author SHA1 Message Date
Áron Hárnási
c43a0614d4
patch 9.1.1611: possible undefined behaviour in mb_decompose()
Problem:  possible undefined behaviour in mb_decompose(), when using the
          same pointer as argument several times
Solution: use separate assignments to avoid reading and writing the same
          object at the same time (Áron Hárnási)

closes: #17953

Signed-off-by: Áron Hárnási <aron.harnasi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1611
2025-08-09 23:43:13 +02:00
Doug Kearns
c65643cbec
runtime(vim): Update ftplugin, fix option variable 'keywordprg' matching
- Match &option, and &[lg]:option variables.
- Match Ex commands after :bar.
- Fix matching of pre and post context text.
- Style - use '..' for string concatenation.

fixes #17567
closes: #17653

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-09 23:41:21 +02:00
D. Ben Knoble
7270a5a843
runtime(racket): update Racket runtime files
This brings the upstream files to commit 9dc3bd3 (ftplugin: escape Vim
special characters when opening docs, 2025-08-09). Note that not all
upstream files are included.

closes: #17956

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-09 23:38:07 +02:00
RestorerZ
7f8ad9b374
translation: Generate year for MS Windows differently
Commit 22fc41f1f7c94fca491b6759e49ac2430f0b81a2 used wmic to generate
the year, however it may not always be available. So use Powershell
directly.

related: #17855
closes: #17955

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-09 23:35:11 +02:00
zeertzjq
982cda6976
patch 9.1.1610: completion: hang or E684 when 'tagfunc' calls complete()
Problem:  completion: hang (after 9.1.1471) or E684 (after 9.1.1410)
          when 'tagfunc' calls complete().
Solution: Check if complete() has been called immediately after getting
          matches instead of in the next loop iteration (zeertzjq).

related: #1668
related: neovim/neovim#34416
related: neovim/neovim#35163
closes: #17929

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1610
2025-08-08 16:05:23 +02:00
Christian Brabandt
bc51ec53d0
runtime(doc): Update CONTRIBUTING and clarify use of Vim9 script
related: #17871

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-08 15:49:43 +02:00
Girish Palya
761ea77670
patch 9.1.1609: complete: Heap-buffer overflow with complete function
Problem:  complete: Heap-buffer overflow with complete function
          (zeertzjq)
Solution: Do not let startcol become negative (Girish Palya).

fixes: #17907
closes: #17934

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1609
2025-08-08 15:42:27 +02:00
Christian Brabandt
b89ff6c2e1
runtime(c): set omnifunc only for Vim, since it is Vim9 Script
related: #17871

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-08 13:45:25 +02:00
Maxim Kim
fa2bcbdebc
runtime(vim): add simple vimscript complete function
closes: #17871

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-08 13:42:49 +02:00
Christian Brabandt
25599902ca
runtime(script): Update Last Change Header
This was missing from Patch v9.1.1606
(Commit: eb2aebeb7982168ece3888c9c0b08fc46f9d4d15)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-08 13:35:55 +02:00
Doug Kearns
126731c8fd
patch 9.1.1608: No command-line completion for :unsilent {command}
Problem:  No command-line completion for :unsilent {command}.
Solution: Add missing command arg completion (Doug Kearns).
          (author)

Add completion tests for all command modifiers.

closes: #17524

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1608
2025-08-08 13:34:04 +02:00
Hirohito Higashi
efd83d441b
patch 9.1.1607: :apple command detected as :append
Problem:  :apple command detected as :append (dai475694450)
Solution: Disallow to define a custom command with lower-case letter,
          correctly detect :insert/:change/:append ex commands
          (Hirohito Higashi).

fixes: #17893
closes: #17930

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1607
2025-08-08 13:25:27 +02:00
lacygoill
eb2aebeb79
patch 9.1.1606: filetype: a few more files are not recognized
Problem:  filetype: a few more files are not recognized
Solution: guess Mail, Info and Terminfo files by its content
          (lacygoill)

closes: #17880

Signed-off-by: lacygoill <lacygoill@lacygoill.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1606
2025-08-08 13:17:57 +02:00
kuuote
8a65a49d50
patch 9.1.1605: cannot specify scope for chdir()
Problem:  Cannot specify scope for chdir()
Solution: Add optional scope argument (kuuote)

closes: #17888

Signed-off-by: kuuote <znmxodq1@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1605
2025-08-08 13:09:25 +02:00
Girish Palya
d82c918e2f
runtime(doc): Improve doc for cmdline-autocomplete
Maybe this was unnecessary, but saw this:
https://github.com/vim/vim/issues/17854

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-08 13:03:43 +02:00
Damien Lejay
46ec899026
runtime(doc): update develop assumptions
closes: #17892

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-08 12:51:23 +02:00
Girish Palya
04c9e78cd3
patch 9.1.1604: completion: incsearch highlight might be lost
Problem:  completion: incsearch highlight might be lost after search
          completion (Hirohito Higashi)
Solution: Restore incsearch highlight after dismissing pum with Ctrl-E
          (Girish Palya)

related: #17870
closes: #17891

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1604
2025-08-08 12:42:10 +02:00
RestorerZ
3be4ad76df
runtime(optwin): Fix E94 when searching for the option-window
Problem:  When the parameter debug=msg is set and the command :option is
          entered, error E94 will be displayed.
Solution: Add a check for the existence of the buffer before getting the
          buffer number “option-window”.

Reproduce:

vim --clean -c "set debug=msg" -c "option"

    Error detected while processing command line..script D:\Programs\Vim\vim91\optwin.vim:
    line 9: E94: No matching buffer for option-window

closes: #17927

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-08 12:38:33 +02:00
Girish Palya
1bfe86a7d3
patch 9.1.1603: completion: cannot use autoloaded funcs in 'complete' F{func}
Problem:  completion: cannot use autoloaded funcs in 'complete' F{func}
          (Maxim Kim)
Solution: Make it work (Girish Palya)

fixes: #17869
closes: #17885

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1603
2025-08-08 12:30:35 +02:00
Aliaksei Budavei
7132935413
runtime(java): Manage byte limits for variable-width lookbehind assertions
Raise the byte limits from 80 to 120 for "javaFuncDef" and
"java*CommentTitle"; and support selecting other arbitrary
values with
------------------------------------------------------------
	let g:java_lookbehind_byte_counts = {
		\ 'javaMarkdownCommentTitle': 240,
	\ }
------------------------------------------------------------

for related groups of syntax definitions, referring to their
names with dictionary keys.

Over-80-Byte-Limit Lookbehind Examples:
https://raw.githubusercontent.com/openjdk/jdk/refs/tags/jdk-24%2B36/src/java.base/share/classes/sun/security/x509/NamedX509Key.java [Lines 43 & 44]
https://raw.githubusercontent.com/openjdk/jdk/refs/tags/jdk-24%2B36/src/jdk.compiler/share/classes/com/sun/tools/javac/util/GraphUtils.java [Line 154]

closes: #17921

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-08 10:50:19 +02:00
Phạm Bình An
adfea9b4e6
runtime(help): Unset 'comments' and 'cms' options
Problem:  Vim's help file doesn't have any syntax for comments, but
          'comments' and 'commentstring' are still set in the help
          buffer.
Solution: Unset 'comments' and 'cms' in help buffer

closes: #17889

Signed-off-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-08 10:44:18 +02:00
Christian Brabandt
6a6a44ffb5
runtime(netrw): netrw#BrowseX() needs to distinguish local and remote file
fixes: #17794

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-07 20:23:16 +02:00
rhysd
66d8d286cd
runtime(typescript): Add syntax support for defer and arbitrary module identifiers
closes: #17911

Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-07 20:08:42 +02:00
RestorerZ
22fc41f1f7
translation: Auto-generate headers for the vim.pot file
closes: #17855

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-07 16:17:28 +02:00
Xudong Zheng
d305729bc5
patch 9.1.1602: filetype: requirements-*.txt files are not recognized
Problem:  filetype: requirements-*.txt files are not recognized
Solution: Detect requirements-*.txt files as requirements filetype
          (Xudong Zheng).

References:
- https://github.com/search?q=path%3Arequirements-*.txt&type=code
- https://github.com/zephyrproject-rtos/zephyr/tree/v4.2.0/scripts

closes: #17894

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1602
2025-08-07 15:55:49 +02:00
Hirohito Higashi
6abe5e4904
patch 9.1.1601: Patch v8.1.0425 was wrong
Problem:  Patch v8.1.0425 was wrong
Solution: Revert that patch (Hirohito Higashi)

This is because the root cause was fixed in 8.1.0786 and a regression
occurred elsewhere.

related: #3455
related: #3830
fixes: #11558
closes: #17899

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1601
2025-08-07 15:51:25 +02:00
veotos
c849b17e19
runtime(netrw): Use correct "=~#" for the netrw_sizestyle='H' option
Correct expression syntax to match case in if and if-else clauses.

related: #8535
closes: #17901

Signed-off-by: veotos <veotos@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-07 15:48:11 +02:00
Squibid
93f6454724
runtime(openscad): add a filetype plugin
closes: #17902

Signed-off-by: Squibid <me@zacharyscheiman.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-07 15:42:54 +02:00
Yee Cheng Chin
cad3b2421d
patch 9.1.1600: using diff anchors with hidden buffers fails silently
Problem:  diff: using diff anchors with hidden buffers fails silently
Solution: Give specific error message for diff anchors when using hidden
          buffers (Yee Cheng Chin).

Diff anchors currently will fail to parse if a buffer used for diff'ing
is hidden. Previously it would just fail as the code assumes it would
not happen normally, but this is actually possible to do if `closeoff`
and `hideoff` are not set in diffopt. Git's default diff tool "vimdiff3"
also takes advantage of this.

This fix this properly would require the `{address}` parser to be
smarter about whether a particular address relies on window position or
not (e.g. the `'.` address requires an active window, but `'a` or `1234`
do not). Since hidden diff buffers seem relatively niche, just provide a
better error message / documentation for now. This could be improved
later if there's a demand for it.

related: #17615
closes: #17904

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1600
2025-08-07 15:33:34 +02:00
Nir Lichtman
589aa284f6
runtime(javascript): add "as" as a reserved keyword to syntax script
closes: #17912

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-07 15:30:42 +02:00
zeertzjq
9662f33480
patch 9.1.1599: :bnext doesn't go to unlisted help buffers
Problem:  :bnext doesn't go to unlisted help buffers when cycling
          through help buffers (after 9.1.0557).
Solution: Don't check if a help buffer is listed (zeertzjq).

From <https://github.com/vim/vim/issues/4478#issuecomment-498831057>:

> I think we should fix that, since once you get to a non-help buffer
> all unlisted buffers are skipped, thus you won't encounter another
> help buffer.

This implies that cycling through help buffers should work even if help
buffers are unlisted. Otherwise this part of :bnext isn't really useful,
as :h makes help buffers unlisted by default.

related: #4478
related: #15198
closes: #17913

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1599
2025-08-07 15:24:29 +02:00
veotos
9c4de84b2d
runtime(doc): Update ft-vim-syntax documentation
g:vimsyn_folding and g:vimsyn_embed regexps need to match case.

closes: #17914

Signed-off-by: veotos <veotos@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-07 15:22:04 +02:00
Furkan Sahin
a6e28b1d05
patch 9.1.1598: filetype: waybar config file is not recognized
Problem:  filetype: waybar config file is not recognized
Solution: Detect */waybar/config file as jsonc filetype
          (Furkan Sahin)

closes: #17915

Signed-off-by: Furkan Sahin <furkan-dev@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1598
2025-08-07 15:13:21 +02:00
Christian Brabandt
47a668bbe8
patch 9.1.1597: CI reports leaks in libgtk3 library
Problem:  CI reports leaks in libgtk3 library
Solution: Add libgtk-3 library to leak suppression

Recently, CI started reporting leaks inside the GTK3 library, which cause
failures like here
https://github.com/vim/vim/actions/runs/16796766276/job/47572520887?pr=17922

So let's add libgtk-3*.so* to the leak suppression for the
gtk_init_check() function.

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1597
2025-08-07 15:01:19 +02:00
zeertzjq
615ad4ced1
patch 9.1.1596: tests: Test_search_wildmenu_iminsert() depends on help file
Problem:  tests: Test_search_wildmenu_iminsert() depends on help file
          (after 9.1.1594).
Solution: Set buffer text using setline() instead of loading help file.
          Add a test for another bug fixed by 9.1.1594 (zeertzjq).

related: #17870
closes: #17922

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1596
2025-08-07 14:57:22 +02:00
Lane East
54fb7ba256
runtime(doc): remove mentioning of netrwSettings.vim
closes: #17925

Signed-off-by: Lane East <laneast@laneast.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-07 14:37:20 +02:00
Girish Palya
f7deb815b0
runtime(doc): fix typo at :h cmdline-autocompletion
The '?' needs to be escaped, because the autocommand is using
file-patterns (glob like) and not a regex). See :h file-pattern

closes: #17890

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 20:53:33 +02:00
Foxe Chen
bb99474ceb
patch 9.1.1595: Wayland: non-portable use of select()
Problem:  Wayland: non-portable use of select()
Solution: Correctly set the timeval struct
          (Foxe Chen)

closes: #17886

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1595
2025-08-06 20:38:33 +02:00
Girish Palya
66467cf5d8
patch 9.1.1594: completion: search completion throws errors
Problem:  completion: search completion throws errors, wrong placement
          of pum menu with 'imi'=1 (berggeist)
Solution: Fix those errors (Girish Palya)

fixes: #17858
closes: #17870

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1594
2025-08-06 17:12:14 +02:00
Hirohito Higashi
bb0860abc9
runtime(doc): tweak option name notation further
related: #17857
closes: #17917

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 17:00:58 +02:00
zeertzjq
067adc1ff2
runtime(doc): add back bars for the '' mark
this was erroneously changed in commit
85cd509885a05c3a6bb029fb378b1295f107f8f6

related: #17857

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 13:41:05 +02:00
lacygoill
c0b3c19120
runtime(vim): add gf support for import and packadd in ftplugin
closes: #17881

Signed-off-by: lacygoill <lacygoill@lacygoill.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 13:38:30 +02:00
lacygoill
9340aa1bf8
runtime(helptoc): add s keymap to split and jump to selected entry
closes: #17876

Signed-off-by: lacygoill <lacygoill@lacygoill.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 13:06:34 +02:00
Aliaksei Budavei
af2c8e256a
runtime(syntax-tests): Break up non-ASCII over-75-byte-long lines
And anticipate occasional multibyte line wrapping owing to:
> A poorly rendered line may otherwise become wrapped when enough of
> spurious U+FFFD (0xEF 0xBF 0xBD) characters claim more columns than
> are available (75) and then invalidate line correspondence under test.

Observe that for "vim_ex_command.vim" another workaround is
chosen: the long line containing an only multibyte character
near its EOL is conversely made longer by padding and moving
the character to a separate _tail_ part of the wrapped line.
That is, the _head_ part of the line is all ASCII characters
and the wrapped _tail_ part is a mix of various characters
whose total byte count is within bounds.

Other unmodified tracked files of interest:
  java_lambda_expressions.java,
  java_lambda_expressions_signature.java,
  java_numbers.java,
  markdown_conceal.markdown,
  vim9_generic_function_example_set.vim

Also, remove stray U+FFFC (0xEF 0xBF 0xBC) characters.

Related to #16559 and #17704.

Reference:
0fde6aebdd/runtime/syntax/testdir/README.txt (L120-L123)

closes: #17868

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 12:50:30 +02:00
Emilien Breton
3769100a8e
runtime(doc): fix mismatch between 'backspace' and |i_backspacing|
closes: #17867

Signed-off-by: Emilien Breton <bricktech2000@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 12:48:06 +02:00
Hirohito Higashi
85cd509885
runtime(doc): Use correct option-name tags
closes: #17857

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 12:44:36 +02:00
Ken Takata
02bbc8a706
CI: Update labeler.yml with correct netrw path
closes: #17916

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 11:44:38 +02:00
Hirohito Higashi
a7a2a2b5ae
runtime(doc): Tweak documentation style
closes: #17862

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 11:43:45 +02:00
Christian Brabandt
5a2575b484
translation(uk): Fix wrong Ukrainian message translation
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 11:40:47 +02:00
Antonio Giovanni Colombo
96dab9c9b1
check.vim: Further improve po message checks
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-06 11:33:49 +02:00