Commit Graph

33523 Commits

Author SHA1 Message Date
zeertzjq
e6e1e71abf vim-patch:dba9eb4: runtime(python): Also sync syntax at 'async def' (#35309)
A file containing only async functions (`async def func()`) wouldn't
previously match the pythonSync pattern.

Also, this pattern only matches at the beginning of the line, so it
won't ever match method definitions (which are indented within class
scopes). Update the comment accordingly.

closes: vim/vim#17963

dba9eb46e6

Co-authored-by: Jon Parise <jon@indelible.org>
2025-08-12 20:11:38 +08:00
tao
a26cdcb20e fix(inccommand): skip input() during preview #35272
Problem:
During preview, the `input` still prompts the user to enter something
that won't be used later, which could be a bit confusing.
e.g., `:s/a/\=input("")`.

Solution:
Make the input() return early during 'inccommand' preview.
2025-08-11 15:39:03 -07:00
Sergei Slipchenko
bc4bddbb21 fix: don't use logical diagnostic position in get_prev and get_next #35282
Problem: `vim.diagnostic.get_prev()` / `vim.diagnostic.get_next()` use
logical diagnostic positions and consider extmark validity.
`vim.diagnostic.get()` only uses original positions and doesn't care
about extmark validity. This results in inconsistency between these
APIs.

Solution: use original positions in `vim.diagnostic.get_prev()` and
`vim.diagnostic.get_next()` and don't consider extmark validity to match
previous behavior, which is consistent with `vim.diagnostic.get`.
2025-08-11 15:34:29 -07:00
Justin M. Keyes
3c7b698d61 Merge #35270 vim.pack: more control over "load" behavior 2025-08-11 18:20:25 -04:00
Shashwat Agrawal
67fede0fc9 fix(gen_help_html): ASCII art rendering in docs #35262
Problem:
gen_help_html.lua script misinterprets parts of ASCII diagrams as help tags
(e.g., `|_________|` in `usr_28.txt`). This incorrectly triggered
special alignment-fixing logic that is meant for columnar text.

Signed-off-by: Shashwat Agrawal <shashwatagrawal473@gmail.com>
2025-08-11 14:37:26 -07:00
skewb1k
7cc07e8383 feat(lsp): support signature help noActiveParameterSupport #34838 2025-08-11 14:31:57 -07:00
luukvbaal
be5a4851ea fix(extui): ensure temporary cmdline config is not restored #35301
Problem:  Temporary cmdline config is saved to be restored later.
Solution: Close the cmdline window so that it is recreated with the appropriate config.
2025-08-11 14:13:39 -07:00
Maria José Solano
f7802dd5d5 fix(lsp): deprecate vim.lsp.set_log_level, vim.lsp.get_log_path #35274 2025-08-11 13:51:40 -07:00
dependabot[bot]
b52f9a19b3 ci: bump actions/checkout from 4 to 5 #35305
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 13:43:53 -07:00
Riley Bruins
09f2c8d8ed docs(lsp): specify formatting_options type (#35302) 2025-08-11 14:36:35 -04:00
Maria José Solano
e94d8f03b9 fix(lsp): check for lens range in vim.lsp.codelens.run() (#35294) 2025-08-11 12:37:32 -04:00
zeertzjq
e3fd906b61 Merge pull request #35283 from janlazo/vim-8.1.0636
vim-patch:8.1.{636,1681,1700,1711},8.2.0115
2025-08-11 13:48:00 +08:00
Jan Edmund Lazo
7048c36ba8 vim-patch:8.2.0115: byte2line() does not work correctly with text properties
Problem:    Byte2line() does not work correctly with text properties. (Billie
            Cleek)
Solution:   Take the bytes of the text properties into account.
            (closes vim/vim#5334)

9df53b62de

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-11 01:06:42 -04:00
Jan Edmund Lazo
750c350be8 vim-patch:8.1.1711: listener callback called at the wrong moment
Problem:    Listener callback called at the wrong moment
Solution:   Invoke listeners before calling ml_delete_int(). (closes vim/vim#4657)

acf7544cf6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-10 23:35:10 -04:00
Jan Edmund Lazo
c9b35360ac vim-patch:8.1.1700: listener callback called for the wrong buffer
Problem:    Listener callback called for the wrong buffer.
Solution:   Invoke listeners before calling ml_append_int().

250e3112c6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-10 23:35:10 -04:00
Jan Edmund Lazo
83f38800e7 vim-patch:8.1.1681: insert stray "{" when listener gets buffer line
Problem:    Insert stray "{" when listener gets buffer line. (Paul Jolly)
Solution:   Flush the cached line after invoking listeners. (closes vim/vim#4455)

0fb286e82d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-10 22:22:44 -04:00
Jan Edmund Lazo
36fc266e86 vim-patch:8.1.0636: line2byte() gives wrong values with text properties
Problem:    line2byte() gives wrong values with text properties. (Bjorn Linse)
Solution:   Compute byte offsets differently when text properties were added.
            (closes vim/vim#3718)

b413d2e6a8

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-10 22:22:44 -04:00
zeertzjq
03c953008c vim-patch:32d6bd6: runtime(doc): remove dead links (#35297)
related: vim/vim#17879

32d6bd6df2

N/A patch:
vim-patch:8b18345: runtime(doc): Fix 2 minor issues after 32d6bd6df

Co-authored-by: Damien Lejay <damien@lejay.be>
2025-08-11 00:04:30 +00:00
zeertzjq
d2cdfc413b Merge pull request #35296 from zeertzjq/vim-7270a5a
vim-patch: runtime file updates
2025-08-11 07:23:43 +08:00
zeertzjq
39af96c8ef vim-patch:a94a055: runtime(python): Highlight f-string replacement fields in Python
Highlight f-string replacement fields, including

- Comments
- Debugging flags
- Conversion fields
- Format specifications
- Delimiters

Syntax inside fields will be addressed in a separate commit.

related: vim/vim#10734
related: vim/vim#14033
closes: vim/vim#17784

a94a0555d9

Co-authored-by: Rob B <github@0x7e.net>
2025-08-11 07:01:27 +08:00
zeertzjq
82a54a772b vim-patch:48b7eb1: runtime(python): Highlight classes as structures
Class and function definitions previously shared a single highlight
group (pythonFunction). This change gives classes their own highlight
group (pythonClass) that's linked to Structure.

closes: vim/vim#17856

48b7eb1ceb

Co-authored-by: Jon Parise <jon@indelible.org>
2025-08-11 07:00:50 +08:00
zeertzjq
d395dc9d38 vim-patch:7270a5a: 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: vim/vim#17956

7270a5a843

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2025-08-11 07:00:28 +08:00
Dietrich Moerman
47e3aecb78 vim-patch:9.1.1620: filetype: composer.lock and symfony.lock files not recognized (#35291)
Problem:  filetype: composer.lock and symfony.lock files not recognized
Solution: Detect composer.lock and symfony.lock files as json filetype
          (Dietrich Moerman)

closes: vim/vim#17945

4fca92faa2
2025-08-10 13:42:57 +00:00
zeertzjq
9d85f086d9 vim-patch:9.1.1622: Patch v9.1.1432 causes performance regressions (#35288)
Problem:  Patch v9.1.1432 causes performance regressions
Solution: Revert "patch 9.1.1432: GTK GUI: Buffer menu does not handle
          unicode correctly" (Yee Cheng Chin).

This reverts commit 08896dd330c6dc8324618fde482db968e6f71088.

The previous change to support Unicode characters properly in the
buffers menu resorted to removing all buffer menus and re-add the
buffers after doing a sort, per each buffer addition. This was quite
slow because if Vim is trying to load in multiple buffers at once (e.g.
when loading a session) this scales in O(n^2) and Vim can freeze for
dozens of seconds when adding a few hundred buffers.

related: vim/vim#17405
related: vim/vim#17928
fixes: vim/vim#17897

cda0d17f59

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-08-10 09:11:13 +00:00
zeertzjq
22d90217c6 vim-patch:partial:fc3c204: runtime(doc): Fix style and typos in builtin.txt and usr_41.txt (#35286)
- Reformat parts to fit into 80 column window.
- Fix example with mandatory call with a range.
  https://github.com/vim/vim/discussions/17950#discussioncomment-14055687
- Remove some duplicate information

closes: vim/vim#17949

fc3c204bbe

Function list changes only.

Co-authored-by: veotos <veotos@users.noreply.github.com>
2025-08-10 08:23:48 +00:00
zeertzjq
dae79f2b67 vim-patch:9.1.1619: Incorrect E535 error message (#35285)
Problem:  Incorrect E535 error message (after 9.1.1603).
Solution: Don't use transchar(), as the character is always printable
          (zeertzjq).

closes: vim/vim#17948

b362995430
2025-08-10 16:22:43 +08:00
zeertzjq
f0d8341984 vim-patch:9.1.1618: completion: incorrect selected index returned from complete_info() (#35284)
Problem:  completion: incorrect selected index returned from
          complete_info()
Solution: Return the index into "items" and restore the previous
          behaviour (Robert Muir).

complete_info() returned an incorrect selected index after
0ac1eb3555445f4c458c06cef7c411de1c8d1020 (Patch v9.1.1311). Effectively
it became an index into "matches" instead of "items". Return the index
into "items" by default to restore the previous behavior, unless
"matches" was requested.

closes: vim/vim#17952

8e2a229189

Co-authored-by: Robert Muir <rmuir@apache.org>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-08-10 16:21:47 +08:00
bfredl
72969f1301 Merge pull request #35263 from bfredl/zig15
fix(build): remove deprecated aliases in build.zig removed for zig 0.15
2025-08-10 09:24:27 +02:00
zeertzjq
74511a98fd Merge pull request #35278 from zeertzjq/vim-9.1.1612
vim-patch:9.1.{1612,1613}
2025-08-10 09:05:41 +08:00
zeertzjq
9e8d551b1e vim-patch:9.1.1613: tests: test_search leaves a few swapfiles behind
Problem:  tests: test_search leaves a few swapfiles behind
Solution: Use :bw! instead of :close to close the swapfile at the end of
          the test.

related: vim/vim#17933

a2bb21a895

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-08-10 08:25:23 +08:00
zeertzjq
1eca030fb2 vim-patch:9.1.1612: Ctrl-G/Ctrl-T do not ignore the end search delimiter
Problem:  Ctrl-G/Ctrl-T does not ignore the end search delimiter
          (irisjae)
Solution: Check if the pattern ends with a search delimiter and ignore
          it, unless it is part of the pattern.

fixes: vim/vim#17895
closes: vim/vim#17933

c03990d30f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-08-10 08:24:55 +08:00
zeertzjq
f79430e2ce vim-patch:9.1.1615: diff format erroneously detected (#35276)
Problem:  diff format erroneously detected
          (Tomáš Janoušek)
Solution: Make the regex to detect normal diff format a bit stricter,
          while at it, fix wrong test content from patch v9.1.1606

fixes: vim/vim#17946

887b4981e7

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-08-09 23:27:53 +00:00
zeertzjq
77500c5ad5 vim-patch:9.1.1611: possible undefined behaviour in mb_decompose() (#35275)
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: vim/vim#17953

c43a0614d4

Co-authored-by: Áron Hárnási <aron.harnasi@gmail.com>
2025-08-10 07:23:59 +08:00
Evgeni Chasnovski
acff86601e feat(pack): allow skip install confirmation in add()
Problem: No way to skip install confirmation in `add()`. Having install
  confirmation by default is a more secure design. However, users are
  usually aware of the fact that plugin will be installed and there is
  currently no way to skip confirmation.

  Plus it can introduce inconvenience on the clean config initialization
  if it is modularized with many `vim.pack.add()` calls (leads to
  confirming installation many times in a row).

Solution: Add `opts.confirm` option that can skip install confirmation.
2025-08-09 17:54:39 +03:00
Evgeni Chasnovski
dd828690c7 feat(pack): allow function opts.load in add()
Problem: No way to have full control over how plugin is loaded.
  Although `:packadd!` has small side effects (only adds plugin
  directory to 'runtimepath'; and maybe its 'after/' subdirectory), it
  still has side effects. For example, 'plugin/' directories are still
  loaded during startup (as part of `:h load-plugins`).

Solution: Allow function `opts.load` that has full control over how
  plugin is loaded.
2025-08-09 17:36:15 +03:00
Evgeni Chasnovski
b337c6e0fc fix(pack): update add() to have default load=false during startup
Problem: the `load=true` in `vim.pack.add()` means that `:packadd` is
  executed even during startup. This leads to force source of 'plugin/',
  which breaks the intended loading order (`:h load-plugins`) and
  results into sourcing them twice. This also makes it ignore
  `--noplugin` argument.

  Using `:packadd!` during startup is more appropriate, while `:packadd`
  afterwards is still more favorable to actually force 'plugin/' source
  (as there is no pre-defined mechanism that will load them later).

Solution: have `load=false` default during startup, `true` - afterwards.
2025-08-09 17:36:15 +03:00
zeertzjq
e3913c0fc2 vim-patch:9.1.1606: filetype: a few more files are not recognized (#35268)
Problem:  filetype: a few more files are not recognized
Solution: guess Mail, Info and Terminfo files by its content
          (lacygoill)

closes: vim/vim#17880

eb2aebeb79

Co-authored-by: lacygoill <lacygoill@lacygoill.me>
2025-08-09 13:38:20 +00:00
zeertzjq
f7e8efd2e9 Merge pull request #35267 from zeertzjq/vim-7132935
vim-patch: runtime updates
2025-08-09 21:31:26 +08:00
zeertzjq
7a07454867 vim-patch:3be4ad7: 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: vim/vim#17927

3be4ad76df

Co-authored-by: RestorerZ <restorer@mail2k.ru>
2025-08-09 21:04:28 +08:00
zeertzjq
acc55f6fed vim-patch:7132935: 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: vim/vim#17921

7132935413

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-08-09 21:03:56 +08:00
bfredl
a2b0be19bf fix(build): remove deprecated aliases in build.zig removed for zig 0.15
This makes the zig build compatible with the upcoming zig 0.15 release,
while still supporting the current stable 0.14 release still used in CI.
2025-08-09 12:02:07 +02:00
zeertzjq
2c3929624a Merge pull request #35260 from zeertzjq/vim-9.1.1603
vim-patch:9.1.{1603,1609}
2025-08-09 11:20:35 +08:00
zeertzjq
5f23aaba00 vim-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: vim/vim#17907
closes: vim/vim#17934

761ea77670

Co-authored-by: Girish Palya <girishji@gmail.com>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-08-09 10:58:51 +08:00
zeertzjq
b1e35cbd7b vim-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: vim/vim#17869
closes: vim/vim#17885

1bfe86a7d3

Cherry-pick Test_omni_autoload() from patch 8.2.3223.

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-08-09 10:58:51 +08:00
Mathias Fußenegger
1968029003 fix(snippet): sync tabstop text also if pmenu is visible (#35250)
Using a snippet like:

    ${1:name} :: ${2}\n${1:name} ${3}= ${4:undefined}${0}

The text for `${1:name}` stopped syncing if the completion popup menu
showed up. E.g. typing `par` where the `a` triggered completion resulted
in:

    pat ::
    pa = undefined

Instead of:

    pat ::
    pat = undefined
2025-08-08 18:56:54 -07:00
zeertzjq
fa92a0b9fe fix(cmdline): completion for command after :restart (#35256) 2025-08-09 01:25:14 +00:00
zeertzjq
5977bdba05 fix(cmdline): trigger CmdlineChanged after command preview (#35254) 2025-08-09 01:16:13 +00:00
zeertzjq
b2828af5b5 Merge pull request #35252 from zeertzjq/vim-9.1.1608
vim-patch:9.1.{0748,1608}
2025-08-09 08:25:09 +08:00
zeertzjq
fe42c81f2e vim-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: vim/vim#17524

126731c8fd

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-08-09 08:03:25 +08:00
zeertzjq
70bb7999f7 vim-patch:9.1.0748: :keep* commmands are sometimes misidentified as :k
Problem:  The :keep{alt,jumps,marks,patterns} commmands are sometimes
          misidentified as :k.
Solution: Make sure one_letter_cmd() only returns true for :k and not
          other :keep* commands (Doug Kearns).

This currently manifests as missing completion for :keep* commands and
incorrect results from fullcommand().

E.g., fullcommand("keepmarks") returns "k" rather than "keepmarks".

The correct command, however, is executed as command modifiers are
handled specially in do_one_cmd() rather than using find_ex_command().

Fix exists(':k') so that it returns 2 for a full match.

closes: vim/vim#15742

ea84202372

Cherry-pick Test_ex_command_completion() from patch 9.1.0624.

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-08-09 08:03:25 +08:00