Commit Graph

33972 Commits

Author SHA1 Message Date
zeertzjq
eb7c12d3e3 test: remove a few more redundant clear() calls (#35903) 2025-09-24 14:25:54 +08:00
zeertzjq
b256e0476b test(lua/secure_spec): clean up properly (#35902)
- Remove "state" directory after each test, so that a failure in one
  test won't interfere with later tests.
- Still make sure the trust file is empty at the end of each test.
2025-09-24 12:30:57 +08:00
zeertzjq
a62fb57e58 test: don't call clear() in both before_each() and after_each() (#35901) 2025-09-24 11:41:43 +08:00
zeertzjq
d954763b85 vim-patch:b1446df: runtime(vim): Update base syntax, match :wincmd (#35898)
Match the full :wincmd command syntax.

Allow for oneline assignment to Vim9 variables named winc[md].

Fixes vim/vim#18368.

b1446dfd23

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-24 10:22:46 +08:00
zeertzjq
94f1abf89c test(tui_spec): avoid dangling Nvim processes on test failure (#35900)
Also don't wait indefinitely for all Nvim processes to exit.
2025-09-24 02:21:42 +00:00
zeertzjq
1dc21e1e85 Merge pull request #35896 from zeertzjq/vim-9.1.1787
vim-patch: swayconfig runtime file updates
2025-09-24 09:27:07 +08:00
zeertzjq
b7742714aa vim-patch:20e78ee: runtime(swayconfig): support new config options in syntax script
From sway(5):
 - allow_tearing
 - primary_selection
 - swaybg_command
 - swaynag_command

From sway-output(5):
 - color_profile
 - allow_tearing

From sway-input(5):
 - clickfinger_button_map
 - rotation_angle
 - scroll_button_lock

closes: vim/vim#18293

20e78ee807

Co-authored-by: Felix Pehla <29adc1fd92@gmail.com>
2025-09-24 08:38:15 +08:00
zeertzjq
0c23b863f4 vim-patch:9.1.1787: filetype: not all Sway config files are recognized
Problem:  filetype: not all Sway config files are recognized
Solution: Detect files within */sway/config.d/* as swayconfig filetype
          (Felix Pehla).

Sways default config automatically includes files placed in
@sysconfdir@/sway/config.d/* (see config.in), so it makes sense to use
the sway syntax for those.

related: vim/vim#18293

24f0dbba8c

Co-authored-by: Felix Pehla <29adc1fd92@gmail.com>
2025-09-24 08:36:53 +08:00
zeertzjq
409122e5ae vim-patch:11bde1f: runtime(sh): refactored sh.vim syntax script (#35895)
- unified bashStatement, kshStatement and shStatement as much as
  possible
- separated builtin commands from external programs
- cleaned up kornshell flavor logic
- fixed alias syntax highlighting
- added test for bash alias syntax highlighting
- removed daemon keyword

closes: vim/vim#18355

11bde1f169

Co-authored-by: Bjoern Foersterling <bjoern.foersterling@gmail.com>
2025-09-24 00:28:38 +00:00
zeertzjq
dd630e7f84 vim-patch:5830407: runtime(netrw): 'equalalways' is not always respected (#35894)
fixes: vim/vim#18358

58304078ad

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-24 00:03:38 +00:00
Justin M. Keyes
b986fd96bc fix(lua): coverity "unreachable" warning #35874
Problem:

    CID 584865:         Control flow issues  (UNREACHABLE)
    /src/nvim/lua/executor.c: 550             in nlua_wait()
    >>>     CID 584865:         Control flow issues  (UNREACHABLE)
    >>>     This code cannot be reached: "abort();".
    550       abort();
    551     }

Solution:
The abort() was intended to encourage explicit handling of all cases, to
avoid fallthrough to a possible `return x` added at the end. However,
this is unlikely so just drop it.
2025-09-23 16:29:02 -07:00
zeertzjq
d2257402e3 test: don't block to wait for previous session's exit (#35885)
This reduces the time taken by clear() by over 20% with ASAN.
2025-09-23 23:25:29 +00:00
luukvbaal
3d5ef97a98 fix(message): no wait return for delayed exception error #35881
Problem:  Wait return for delayed exception error message.
Solution: Check that error was actually shown.
2025-09-23 13:35:08 -07:00
Christian Clason
ccf020d0f3 build(deps): bump tree-sitter to v0.25.10 2025-09-23 11:06:21 +02:00
zeertzjq
7837161076 vim-patch:70d745a: runtime(zip): support PowerShell Core (#35880)
fixes: vim/vim#17987
closes: vim/vim#18345

70d745a61b

Co-authored-by: Shay <shay_public@hotmail.com>
2025-09-22 23:21:27 +00:00
zeertzjq
4b4d58a2f9 vim-patch:224f8ca: runtime(doc): clarify 'fileignorecase' option setting (#35879)
fixes: vim/vim#18360

224f8ca769

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-23 07:10:00 +08:00
zeertzjq
f8bdb671be Merge pull request #35878 from zeertzjq/vim-9.1.1781
vim-patch:9.1.{1781,1783}
2025-09-23 06:41:16 +08:00
Peter Aronoff
7b99e1f0c3 fix: remove typo from buffer-local LSP docs (#35841)
Problem: example code refers to `vim.lsp.buf.document_color`, but there
is no such thing.

Solution: replace `vim.lsp.buf.document_color` with `vim.lsp.document_color`.
2025-09-22 18:27:44 -04:00
zeertzjq
7cdf3bb68a vim-patch:9.1.1783: ins_compl_leader() too far away from ins_compl_leader_len()
Problem:  ins_compl_leader() defined too far away from
          ins_compl_leader_len() (after 9.1.1781).
Solution: Move ins_compl_leader() just before ins_compl_leader_len().
          Add missing "static" to eval0_simple_funccal() definition.
          (zeertzjq).

closes: vim/vim#18364

94c128184f
2025-09-23 06:16:26 +08:00
zeertzjq
0f01cc85bd vim-patch:9.1.1781: some functions could be defined static
Problem:  some functions could be defined static
Solution: Change function definitions and make them static
          (Yegappan Lakshmanan)

closes: vim/vim#18354

3a6cf6d53b

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2025-09-23 06:16:25 +08:00
Yochem van Rosmalen
09266830bd fix(diagnostic): show diagnostics on buffer load #35866
Problem:
Diagnostics set on unloaded buffers are not shown when the buffer loads.

Solution:
Use `once_buf_loaded()` to show the diagnostics on BufRead is the buffer
is not yet loaded.
2025-09-22 13:33:16 -07:00
Karl Yngve Lervåg
0790e08f52 docs(diagnostics): allow list of strings for vim.diagnostic.Opts.border (#35863)
Type checkers complain if we pass a list of strings, but this should be allowed.
2025-09-22 21:57:19 +02:00
zeertzjq
0275627fab Merge pull request #35873 from zeertzjq/test-no-clear
test: reduce some clear() calls
2025-09-22 14:37:27 +08:00
zeertzjq
b9dd3167f4 test: remove duplicate legacy/{increment,undolevels}_spec.lua
They are almost exact copies of parts of test_{increment,undo}.vim.
2025-09-22 14:03:42 +08:00
zeertzjq
6d280804f7 test: make error clearer for RPC request after crash 2025-09-22 14:03:42 +08:00
zeertzjq
777dafdc46 test: reduce some clear() calls
Use only a single clear() call in some test/functional/vimscript/ test
files whose test cases have very little side effect.

A downside of using a single clear() is that if a crash happens in one
test case, all following test cases in the same file will also fail, but
these functionalities and tests don't change very often.
2025-09-22 14:03:42 +08:00
Justin M. Keyes
4adfc4b7bc perf(events): skip Progress prep if there are no subscribers #35871
Problem:
`do_autocmd_progress` does unnecessary work even if there is no Progress
event handler defined.

Solution:
Check `has_event`.
2025-09-21 18:13:46 -07:00
zeertzjq
e887602eb5 vim-patch:9.1.1780: mbyte contains overlapping list of utf_classes table (#35869)
Problem:  mbyte contains overlapping list of utf_classes table
Solution: Update table to contain non-overlapping list (Yuta Yamamoto)

closes: vim/vim#18362

9fa8a114b2

Co-authored-by: Yuta Yamamoto <jichael.y.yuta1995@gmail.com>
2025-09-22 07:30:00 +08:00
SkrrtBacharach
cfe10b4014 fix(health): errors in :checkhealth with pyenv-virtualenv #35865
Problem:
pyenv-virtualenv sets a different path for VIRTUAL_ENV than the path to the
python binary it provides, but these paths both symlink to the same file, so
there should be no disparity. The python health-check reports an error, since it
only checks if these paths are equal, not where they point to (resolve to).

Solution:
- Resolve the python symlinks before checking if they are equal.
- Deduplicate some code.
2025-09-21 14:25:14 -07:00
Justin M. Keyes
c947b8da10 refactor: remove unused fn au_event_is_empty #35862
Redundant with `has_event`.
2025-09-21 08:14:51 +00:00
zeertzjq
c2136e3590 fix(options): increase t_Co buffer size (#35859) 2025-09-21 04:12:37 +00:00
zeertzjq
f60f67c2de test: fix 'autocompletedelay' test flakiness (#35856) 2025-09-21 01:27:44 +00:00
zeertzjq
a70997442e vim-patch:9.1.1779: completion: 'autocomplete' cannot be enabled per buffer (#35853)
Problem:  completion: 'autocomplete' cannot be enabled per buffer
          (Tomasz N)
Solution: Make 'autocomplete' global or local to buffer (Girish Palya)

fixes: vim/vim#18320
closes: vim/vim#18333

0208b3e80a

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-21 00:56:38 +00:00
zeertzjq
6b7fc9d37f vim-patch:841becd: runtime(lf): update syntax to support lf version r38 (#35852)
Adds the lf release 38 specific syntax highlighting changes.

From the PR andis-sprinkis/lf-vim#24 by @CatsDeservePets

closes: vim/vim#18342

841becdc2d

Co-authored-by: Andis Spriņķis <andis@sprinkis.com>
2025-09-21 08:07:01 +08:00
zeertzjq
f91d416403 vim-patch:9.1.1776: completion: "adding" expansion doesn't work with cfc=keyword (#35850)
Problem:  "adding" expansion doesn't work with cfc=keyword.
Solution: Remove incorrect assignment to compl_cont_status. Don't use
          fuzzy collection in "adding" status (zeertzjq).

related: neovim/neovim#35842
closes: vim/vim#18351

e19a882ffc
2025-09-21 07:35:14 +08:00
zeertzjq
d3bd1fba6a vim-patch:9.1.1777: Mouse click to open fold doesn't work with utf-8 "foldclose" chars (#35851)
Problem:  Mouse click to open fold doesn't work with utf-8 "foldclose"
          chars (Balki)
Solution: Use ScreenLinesUC[off] if it is set (zeertzjq).

fixes: vim/vim#18344
closes: vim/vim#18349

8b5fe7d090
2025-09-21 07:32:25 +08:00
zeertzjq
46fb52fe51 Merge pull request #35849 from zeertzjq/vim-9.1.1774
vim-patch:9.1.{1774,1778}: cannot calculate sha256 of a Blob
2025-09-21 07:19:17 +08:00
zeertzjq
a5955e5cc5 vim-patch:9.1.1778: sha256() treats empty blob and null blob differently
Problem:  sha256() treats empty blob and null blob differently
          (after 9.1.1774).
Solution: Handle null blob the same as empty blob (zeertzjq).

closes: vim/vim#18341

2f3b7ea19a
2025-09-21 06:31:27 +08:00
zeertzjq
39a21d749d vim-patch:9.1.1774: cannot calculate sha256 of a Blob
Problem:  cannot calculate sha256() of a Blob
Solution: Change sha256() to accept a Blob or String argument
          (thinca).

closes: vim/vim#18336

4150283b83

Co-authored-by: thinca <thinca@gmail.com>
2025-09-21 06:31:27 +08:00
xieyonn
19ba589946 build(contrib): add bash completion for nvim #35843
Two versions of the completion function are provided:
1. Uses bash-completion@2, which is the community standard for Bash
  completions; version >= 2.12 offers a more user-friendly experience.
2. Uses only bash built-in syntax and completes options only.
2025-09-19 14:59:58 -07:00
Shadman
04f476733c test: fix prompt_buffer_spec flakiness (#35838)
Remove incorrect use of source_script().
2025-09-19 11:14:49 +00:00
zeertzjq
b756a6165a vim-patch:6fd9dac: runtime(log): highlight Java Errors (#35836)
closes: vim/vim#18315

6fd9dac992

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-19 12:36:56 +08:00
Judit Novak
6152bcf42e fix(health): hard fail on invalid "python-*" bin #35382
Problem:
Scripts named with 'python-…' prefix may not be valid python bins. If
such a script is found in a venv, the Python healthcheck fails hard.

    .venv/python-argcomplete-check-easy-install-script
    .venv/bin/python3.13
    .venv/bin/python

Solution:
- Discard known false-positives such as `python-argcomplete*`.
- Call `health.warn()` instead of `assert()` in `python_exepath()`.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-09-18 20:07:14 -07:00
zeertzjq
e2166661d4 vim-patch:9.1.1772: completion: inconsistent selection of first item with 'autocomplete' (#35835)
Problem:  completion: inconsistent selection of first item with
          'autocomplete' (Tomasz N)
Solution: Check for 'autocomplete' option in ins_compl_new_leader()
          (Girish Palya).

fixes: vim/vim#18326
closes: vim/vim#18329

86e8e909f2

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-19 10:47:53 +08:00
zeertzjq
95267b664c vim-patch:9.1.1769: completion: "preinsert" insert wrong word with 'smartcase' and 'autocomplete' (#35834)
Problem:  completion: "preinsert" insert wrong word with 'smartcase' and
          'autocomplete'
Solution: Add compare completed item with the leader (Girish Palya)

closes: vim/vim#18313

a8f7957d0b

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-19 10:47:27 +08:00
zeertzjq
b443a3cb33 Merge pull request #35833 from zeertzjq/vim-9.1.1621
vim-patch:9.1.{1621,1771}
2025-09-19 10:46:36 +08:00
Samuel Huang
e3f15d5424 vim-patch:9.1.1775: filetype: Mamba configuration files are not recognized #35829
Problem:  filetype: Mamba configuration files are not recognized
Solution: Detect .mambarc and mambarc as yaml filetype (Samuel Huang).

References:
- https://mamba.readthedocs.io/en/latest/user_guide/configuration.html

closes: vim/vim#18338

21a21eafec
2025-09-18 19:41:27 -07:00
zeertzjq
0763a85f43 vim-patch:9.1.1771: complete: some redraw issues with 'autocomplete'
Problem:  complete: some redraw issues with 'autocomplete'
Solution: Fix the issues (Girish Palya)

This commit contains the following changes:
* Fix that wildtrigger() might leave opened popupmenu around vim/vim#18298
* Remove blinking message on the command line when a menu item from a loaded
  buffer is selected during 'autocomplete'
* Add a test for PR vim/vim#18265 to demonstrate why the PR is required for correct
  'autocomplete' behavior

fixes: vim/vim#18298
closes: vim/vim#18328

ee9a2f0512

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-19 09:58:24 +08:00
zeertzjq
dd306bd48a vim-patch:9.1.1621: flicker in popup menu during cmdline autocompletion
Problem:  When the popup menu (PUM) occupies more than half the screen
          height, it flickers whenever a character is typed or erased.
          This happens because the PUM is cleared and the screen is
          redrawn before a new PUM is rendered. The extra redraw between
          menu updates causes visible flicker.
Solution: A complete, non-hacky fix would require removing the
          CmdlineChanged event from the loop and letting autocompletion
          manage the process end-to-end. This is because screen redraws
          after any cmdline change are necessary for other features to
          work.
          This change modifies wildtrigger() so that the next typed
          character defers the screen update instead of redrawing
          immediately. This removes the intermediate redraw, eliminating
          flicker and making cmdline autocompletion feel smooth
          (Girish Palya).

Trade-offs:
This behavior change in wildtrigger() is tailored specifically for
:h cmdline-autocompletion. wildtrigger() now has no general-purpose use
outside this scenario.

closes: vim/vim#17932

da9c966893

Use pum_check_clear() instead of update_screen().
Cherry-pick Test_wildtrigger_update_screen() change from patch 9.1.1682.

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-19 09:58:24 +08:00
zeertzjq
c2c33249a7 Merge pull request #35832 from zeertzjq/vim-1e7a288
vim-patch: Autoconf M4 syntax updates
2025-09-19 08:20:10 +08:00