Commit Graph

33496 Commits

Author SHA1 Message Date
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
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
Gregory Anders
a0d94ac469 docs(lsp): add reference to progress indicator protocol (#35215) 2025-08-08 09:59:14 -05:00
zeertzjq
1969f685af vim-patch:9.1.1610: completion: hang or E684 when 'tagfunc' calls complete() (#35243)
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: vim/vim#1668
related: neovim/neovim#34416
related: neovim/neovim#35163
closes: vim/vim#17929

982cda6976
2025-08-08 14:40:56 +00:00
zeertzjq
e7dfbf1343 vim-patch:9.1.1607: :apple command detected as :append (#35237)
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: vim/vim#17893
closes: vim/vim#17930

efd83d441b

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-08-08 13:58:55 +00:00
zeertzjq
798cb0f19a vim-patch:9.1.1605: cannot specify scope for chdir() (#35239)
Problem:  Cannot specify scope for chdir()
Solution: Add optional scope argument (kuuote)

closes: vim/vim#17888

8a65a49d50

Co-authored-by: kuuote <znmxodq1@gmail.com>
2025-08-08 13:50:41 +00:00
zeertzjq
36361d6e4a vim-patch:9.1.1604: completion: incsearch highlight might be lost (#35236)
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: vim/vim#17870
closes: vim/vim#17891

04c9e78cd3

This change actually isn't needed as Nvim doesn't call update_screen()
to redraw pum, but it doesn't hurt either.

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-08-08 13:18:21 +00:00
zeertzjq
75d38bb844 vim-patch:d82c918: runtime(doc): Improve doc for cmdline-autocomplete (#35235)
Maybe this was unnecessary, but saw this:
https://github.com/vim/vim/issues/17854

d82c918e2f

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-08-08 21:01:54 +08:00
Gregory Anders
b1679f0ab6 fix(tui): do not remove SIGWINCH handler when resize events are enabled (#35221)
When Nvim is started in one terminal emulator,
suspended, and later resumed in a different terminal emulator (as can
happen when using e.g. a multiplexer), the new terminal emulator will
not have all of the same modes enabled that the original terminal
emulator had. This is a problem in particular for in-band resize events
because we were disabling the SIGWINCH signal handler when we determined
that the terminal supported this mode.

However, if the new terminal does not support this mode then the
SIGWINCH handler remains disabled, and Neovim no longer properly
resizes. Instead of disabling the SIGWINCH handler, we track the state
of the resize events mode internally. If the mode is enabled then we
return early from the SIGWINCH handler before performing any ioctls or
other system calls. But if the mode is not enabled we proceed as normal.
2025-08-08 07:51:22 -05:00
Phạm Bình An
69cc16d917 vim-patch:adfea9b: runtime(help): Unset 'comments' and 'cms' options (#35232)
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: vim/vim#17889

adfea9b4e6
2025-08-08 09:31:47 +00:00
Christian Clason
ffeb334da0 vim-patch:66d8d28: runtime(typescript): Add syntax support for defer and arbitrary module identifiers
closes: vim/vim#17911

66d8d286cd

Co-authored-by: rhysd <lin90162@yahoo.co.jp>
2025-08-08 10:57:07 +02:00
Christian Clason
62f2b10db3 vim-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: vim/vim#17894

d305729bc5

Co-authored-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2025-08-08 10:23:45 +02:00
Maria José Solano
9139c4f90f fix(lsp): update capability maps (#35227) 2025-08-07 19:33:52 -07:00
zeertzjq
038eb01b41 Merge pull request #35225 from zeertzjq/vim-8.1.0425
vim-patch:{8.1.0425,9.1.1601}
2025-08-08 07:42:34 +08:00
zeertzjq
7230296bdb vim-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: vim/vim#3455
related: vim/vim#3830
fixes: vim/vim#11558
closes: vim/vim#17899

6abe5e4904

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-08-08 06:49:22 +08:00
zeertzjq
c6f0a19206 vim-patch:8.1.0425: ml_get error and crash with appendbufline()
Problem:    ml_get error and crash with appendbufline(). (Masashi Iizuka)
Solution:   Set per-window buffer info. (Hirohito Higashi, closes vim/vim#3455)

9cea87c577

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-08 06:49:22 +08:00
zeertzjq
53ac2ad20a vim-patch:9.1.1599: :bnext doesn't go to unlisted help buffers (#35216)
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: vim/vim#4478
related: vim/vim#15198
closes: vim/vim#17913

9662f33480
2025-08-07 15:57:55 +00:00
zeertzjq
52c2519095 vim-patch:9.1.1600: using diff anchors with hidden buffers fails silently (#35218)
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: vim/vim#17615
closes: vim/vim#17904

cad3b2421d

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-08-07 15:56:10 +00:00
Christian Clason
d994be44d7 vim-patch:93f6454: runtime(openscad): add a filetype plugin
closes: vim/vim#17902

93f6454724

Co-authored-by: Squibid <me@zacharyscheiman.com>
2025-08-07 17:16:22 +02:00
Christian Clason
6502dd43c4 vim-patch:589aa28: runtime(javascript): add "as" as a reserved keyword to syntax script
closes: vim/vim#17912

589aa284f6

Co-authored-by: Nir Lichtman <nir@lichtman.org>
2025-08-07 17:10:44 +02:00
Christian Clason
1f7ab25915 vim-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: vim/vim#17915

a6e28b1d05

Co-authored-by: Furkan Sahin <furkan-dev@proton.me>
2025-08-07 16:35:48 +02:00
zeertzjq
7dbf347dda vim-patch:9c4de84: runtime(doc): Update ft-vim-syntax documentation (#35212)
g:vimsyn_folding and g:vimsyn_embed regexps need to match case.

closes: vim/vim#17914

9c4de84b2d

Co-authored-by: veotos <veotos@users.noreply.github.com>
2025-08-07 22:31:18 +08:00
zeertzjq
5aaee7d2af vim-patch:9.1.1596: tests: Test_search_wildmenu_iminsert() depends on help file (#35210)
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: vim/vim#17870
closes: vim/vim#17922

615ad4ced1
2025-08-07 13:38:45 +00:00
zeertzjq
e12bfb4c70 vim-patch:54fb7ba: runtime(doc): remove mentioning of netrwSettings.vim (#35209)
closes: vim/vim#17925

54fb7ba256

Co-authored-by: Lane East <laneast@laneast.com>
2025-08-07 13:30:38 +00:00
zeertzjq
5f9f706462 fix(ui): check for cmdline mode properly (#35202) 2025-08-07 04:22:01 +00:00
github-actions[bot]
c47a69c1a6 docs: update version.c #35024
vim-patch:8.1.0710: when using timers may wait for job exit quite long
vim-patch:8.1.0969: message written during startup is truncated
vim-patch:8.1.1043: Lua interface does not support Blob
vim-patch:8.1.1389: changes are not flushed when end and start overlap
vim-patch:8.1.1395: saving for undo may access invalid memory
vim-patch:8.1.1534: modeless selection in popup window selects too much
vim-patch:8.1.1571: textprop highlight starts too early if just after a tab
vim-patch:8.1.1573: textprop test fails if screenhots do not work
vim-patch:8.1.1663: compiler warning for using size_t
vim-patch:8.1.1866: modeless selection in GUI does not work properly
vim-patch:8.1.1871: modeless selection in GUI still not correct
vim-patch:8.1.2085: MS-Windows: draw error moving cursor over double-cell char
vim-patch:8.1.2107: various memory leaks reported by asan
vim-patch:8.1.2146: build failure
vim-patch:8.1.2296: text properties are not combined with syntax by default
vim-patch:8.1.2299: ConPTY in MS-Windows 1909 is still wrong
vim-patch:8.1.2337: double-click time sometimes miscomputed

vim-patch:8.2.0300: Vim9: expression test fails without channel support
vim-patch:8.2.0414: channel connect_waittime() test is flaky
vim-patch:8.2.0501: Vim9: script test fails when channel feature is missing
vim-patch:8.2.0508: Vim9: func and partial types not done yet
vim-patch:8.2.0527: Vim9: function types insufficiently tested
vim-patch:8.2.0565: Vim9: tests contain superfluous line continuation
vim-patch:8.2.0640: Vim9: expanding  does not work
vim-patch:8.2.0700: Vim9: converting error message to exception not tested
vim-patch:8.2.0701: Vim9 test fails without job feature
vim-patch:8.2.1481: Vim9: line number reported with error may be wrong
vim-patch:8.2.1609: Vim9: test fails when build without +channel
vim-patch:8.2.1724: Vim9: assignment tests spread out
vim-patch:8.2.1759: Vim9: Some tests are still using :let
vim-patch:8.2.1865: Vim9: add() does not check type of argument
vim-patch:8.2.1867: Vim9: argument to add() not checked for blob
vim-patch:8.2.1965: Vim9: tests fail without the channel feature
vim-patch:8.2.2301: Vim9: cannot unlet a dict or list item
vim-patch:8.2.2304: Vim9: no test for unletting an imported variable
vim-patch:8.2.3006: crash when echoing a value very early
vim-patch:8.2.3007: Vim9: test for void value fails
vim-patch:8.2.3008: startup test may hang
vim-patch:8.2.3009: startup test may hang
vim-patch:8.2.3181: Vim9: builtin function test fails without channel feature
vim-patch:8.2.3242: Vim9: valgrind reports leaks in builtin function test
vim-patch:8.2.3382: crash when getting the type of a NULL partial
vim-patch:8.2.3845: Vim9: test fails when the channel feature is missing
vim-patch:8.2.4407: Vim9: some code not covered by tests
vim-patch:8.2.4410: Vim9: some code not covered by tests

vim-patch:9.0.0563: timer_info() test fails
vim-patch:9.0.2080: vim9_script test too large

vim-patch:9.1.1541: Vim9: error when last enum value ends with a comma
2025-08-06 20:26:50 -07:00
skewb1k
d26db4bfbf feat(lsp): improve signature help display #35190
- Add delimiter between function signature and documentation, matching hover formatting
- Show title only if there are multiple clients or multiple signatures
- Avoid duplicating the title inside the window if it's already shown in the border
2025-08-06 19:56:02 -07:00
skewb1k
d73f2d9657 build(emmyrc.json): use StyLua formatter in .emmyrc.json #35196 2025-08-06 19:52:46 -07:00
dependabot[bot]
c04e40d9f4 ci: bump actions/download-artifact from 4 to 5 (#35188)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  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-06 19:30:34 -07:00