Commit Graph

34592 Commits

Author SHA1 Message Date
zeertzjq
c81ff490dc vim-patch:ffc7f8c: runtime(hog): set undo_ftplugin correctly, delete trailing whitespace
closes: vim/vim#18727

ffc7f8c9da

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2025-12-04 08:51:25 +08:00
zeertzjq
d8f29f7e7d Merge pull request #36825 from zeertzjq/vim-9.1.1950
vim-patch:9.1.{1950,1952}
2025-12-04 08:49:29 +08:00
zeertzjq
ffdc632ea1 vim-patch:9.1.1952: tests: need better tests for tf files
Problem:  tests: need better tests for tf files
Solution: Add better filetype test for terraform/tf filetype

closes: vim/vim#18339

23f23e611f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-04 08:28:09 +08:00
zeertzjq
132567c71f vim-patch:9.1.1950: tests: Test_tagjump.vim leaves swapfiles behind
Problem:  tests: Test_tagjump.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

05a56aabee

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-04 08:27:50 +08:00
Olivia Kinnear
e62dd13f83 fix(lsp): default ClientConfig.exit_timeout to false #36811 2025-12-03 00:58:46 -05:00
Justin M. Keyes
2bbc90f4d5 Merge #36585 feat: has() can check multiple Vim versions 2025-12-03 00:28:53 -05:00
zeertzjq
6d875a03bb Merge pull request #36814 from zeertzjq/vim-9.1.1941
vim-patch:9.1.{1941,1945}
2025-12-03 09:39:35 +08:00
zeertzjq
c3c8a18af7 vim-patch:9.1.1945: tests: Test_getbufwintabinfo() leaves swapfiles behind
Problem:  tests: Test_getbufwintabinfo() leaves swapfiles behind
Solution: Close all open buffers using %bw!

397ad21268

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-03 09:00:49 +08:00
zeertzjq
7452a8a568 vim-patch:9.1.1941: tests: Test_execute_register() leaves swapfile behind
Problem:  tests: Test_execute_register() leaves swapfile behind
Solution: Use :bw instead of :close to close the buffer completely

791478b30a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-03 09:00:24 +08:00
zeertzjq
6456a7cd1e ci(cirrus): update to FreeBSD 14.3 (#36813) 2025-12-03 00:55:05 +00:00
zeertzjq
a702534c50 fix(lsp): close timer when client exits (#36795)
Also, don't start the timer at all when a previous shutdown failed, as
in this case a forced shutdown is used and no timer is needed.

This fixes most of the delays caused by #36750.
The delays caused by #36378 still seem to remain.
2025-12-03 07:44:27 +08:00
Justin M. Keyes
672f6e60c1 fix(health): bug-report formatting, version check #36809
Problem:
Version check failed because of "equality" comparison, so a version
string of "123abc" would not match "123abcdef".

Solution:
- Adjust verison check.
- Improve bug-report formatting.
2025-12-02 17:36:27 +00:00
Anatolii Sakhnik
a141fd2c4d fix(remote): remote-ui connect timeout on slow networks #36800
Problem:
Connecting to a remote Neovim fails on slow network:

```
$ nvim --remote-ui --server 10.0.3.100:11111
Remote ui failed to start: connection refused
```

Strace reveals that the connection wasn't actually refused, but was still in progress:
```
15:52:50.678223 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 11
15:52:50.678278 setsockopt(11, SOL_TCP, TCP_NODELAY, [1], 4) = 0
15:52:50.678320 connect(11, {sa_family=AF_INET, sin_port=htons(11111), sin_addr=inet_addr("10.0.3.100")}, 16) = -1 EINPROGRESS (Дія зараз виконується)
15:52:50.678443 clock_gettime(CLOCK_MONOTONIC, {tv_sec=21736, tv_nsec=57625406}) = 0
15:52:50.678489 io_uring_enter(4, 3, 3, IORING_ENTER_GETEVENTS, NULL, 0) = 3
15:52:50.678544 epoll_pwait(3, [], 1024, 50, NULL, 8) = 0
15:52:50.728911 clock_gettime(CLOCK_MONOTONIC, {tv_sec=21736, tv_nsec=108159596}) = 0
15:52:50.729203 epoll_ctl(3, EPOLL_CTL_DEL, 11, 0x7ffd6ec9a3bc) = 0
15:52:50.729527 close(11)               = 0
```

Solution:
Increase hardcoded timeout from 50ms to 500ms.
2025-12-02 11:14:10 -05:00
luukvbaal
3277dc3b4e fix(ui): postpone UI callbacks during textlock #36803
Problem:  UI callbacks disregard textlock unnecessarily (since d909de2).

Solution: In case the UI is flushed during textlock, make sure Nvim does
          not flush UI callbacks that are expected to change text. Instead
          assume postponing callbacks during textlock is insignificant,
          and will safely happen soon after.
2025-12-02 10:51:22 -05:00
Chris Grieser
4e2ed1d03c fix(treesitter): missing nowait for :InspectTree keymaps #36804 2025-12-02 10:49:58 -05:00
Christian Clason
3e3624db64 build(deps): bump luajit to 6f21cb8ac 2025-12-02 14:25:41 +01:00
Justin M. Keyes
65141153d9 Merge #36792 unreliable tests 2025-12-02 01:06:40 -05:00
Justin M. Keyes
ebd758f809 test: unreliable "channel opened, ..., deleted by pressing a key"
Problem:
Test sometimes fails on macos:

    test/functional/terminal/channel_spec.lua:96: Expected objects to be the same.
    Passed in:
    (number) 3
    Expected:
    (number) 2

Solution:
Retry a few times.
2025-12-02 00:14:09 -05:00
Justin M. Keyes
c8f2b10a40 test: unreliable "job exit event on jobstart(…,{term=true})"
Problem:
Test often fails in cirrus (bsd) ci:

    FAILED   test/functional/terminal/channel_spec.lua @ 149: no crash when TermOpen autocommand processes job exit event when using jobstart(…,{term=true})
    test/functional/terminal/channel_spec.lua:158: Row 1 did not match.
    Expected:
      |*^ready $ foobar                                              |
      |*                                                            |
      |*[Process exited 0]                                          |
      |                                                            |
    Actual:
      |*^ready $                                                     |
      |*[Process exited 0]                                          |
      |*                                                            |
      |                                                            |

Solution:
Use one printf call instead of multiple.
2025-12-02 00:08:38 -05:00
benarcher2691
ad438b6b14 fix(ui): exclude hidden windows from tabline window count #36779
Problem: When `vim._extui` is enabled, the default tabline shows an
incorrect window count (e.g., "2" when only 1 window is visible). This
happens because the extui pager window has `focusable=true` (needed for
user interaction) but `hide=true` (not visible by default).

Solution: Modify the window counting logic in `statusline.c` and
`ex_docmd.c:ex_tabs()` to also exclude hidden windows
(`wp->w_config.hide`), not just non-focusable windows.

Also updates test expectations in `cmdline2_spec.lua` which previously
expected the incorrect window count "2" when extui was enabled. The test
now correctly expects no window count indicator when only 1 visible
window exists.

Fixes #36759
2025-12-01 23:57:56 -05:00
Elias Assaf
310d01d8fa fix(clipboard): tmux clipboard data may be stale #36787
Problem:
When Nvim wants to paste from tmux, it doesn't tell tmux to read the OS
clipboard first, so it may have stale clipboard state.

Solution:
Tickle `tmux refresh-client -l`, before requesting paste, as recommended
in the tmux manpage. https://man7.org/linux/man-pages/man1/tmux.1.html

Fixes https://github.com/neovim/neovim/issues/36786

Signed-off-by: Elias Assaf <elyas51000@gmail.com>
2025-12-01 21:52:40 -05:00
zeertzjq
832ce0ac4b vim-patch:c3cfdef: runtime(doc): clarify the use of v:errormsg (#36789)
fixes: vim/vim#18825

c3cfdefdee

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-02 00:38:18 +00:00
zeertzjq
ade9eac8ca vim-patch:cce452f: runtime(lf): update syntax to support lf version r39 (#36790)
closes: vim/vim#18846

cce452f52d

Co-authored-by: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com>
2025-12-02 00:36:39 +00:00
zeertzjq
e45212101c Merge pull request #36773 from zeertzjq/funccal-refcount
fix(eval): fix crash with :breakadd expr when calling user func
2025-12-02 08:04:54 +08:00
zeertzjq
b64e36cef0 vim-patch:9.1.1943: Memory leak with :breakadd expr
Problem:  Memory leak with :breakadd expr
Solution: Free debug_oldval and debug_newval before assigning to them.
          Verify the existing (though confusing) :breakadd expr behavior
          (zeertzjq).

It seems that :breakadd expr doesn't work as documented at all. This PR
only fixes the memory leak. The tests are for the existing behavior.

closes: vim/vim#18844

a474de64df
2025-12-02 07:24:28 +08:00
zeertzjq
62de643b89 vim-patch:partial:9.0.1570: some tests are slow
Problem:    Some tests are slow.
Solution:   Make a few test cases faster.

bf63011a52

Only include the RunDbgCmd() to s:RunDbgCmd() change.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-12-02 07:08:34 +08:00
zeertzjq
9b15d4c756 vim-patch:9.0.0688: debugger does not display the whole command
Problem:    Debugger does not display the whole command.
Solution:   Set ea.cmd before checking for a breakpoint.

33b55b562b

The code change is already covered by #35019.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-12-02 07:08:34 +08:00
zeertzjq
8156eece24 fix(eval): fix crash with :breakadd expr when calling user func 2025-12-02 07:08:34 +08:00
Yochem van Rosmalen
b058a801e7 ci(lintdocurls): use sed -e flag to mark argument as command #36776
Problem:
Sed thinks the argument starting with `1i` (and triple backticks) is the
suffix for the backup file because it comes right after the `-i` flag.
See for example
https://github.com/neovim/neovim/actions/runs/19774967693/job/56665991723.

Solution:
Explicitly mark it as command using the `-e` flag.
2025-12-01 16:54:10 -05:00
benarcher2691
7f2d5d6883 fix(msgpack): use fixstr encoding for strings of length 20-31 #36737
Problem:
MessagePack fixstr format supports string lengths 0-31, but mpack_str()
only used fixstr for lengths < 20. Strings of 20-31 bytes were
incorrectly encoded as str8 (2-byte header) instead of fixstr (1-byte
header).

Solution:
Change the condition from `len < 20` to `len < 32` to match the
MessagePack specification.

This fix affects message timing which exposed a pre-existing race
condition in the channels_spec PTY test. The test now uses a helper
function to accumulate partial PTY reads, making it more robust.

Fixes #32784
2025-12-01 13:16:44 -05:00
Tristan Knight
1de77c608f fix(lsp): handle nil request in semantic tokens #36780
Allow the `request` parameter in `tokens_to_ranges` to be `nil` and
update version checking logic accordingly. This prevents errors when
the request is not present and improves robustness of semantic token
handling.
2025-12-01 12:51:04 -05:00
Sean Dewar
8ede293b8a docs(README): fix logo (#36778)
Old link presumably broken after the website's move to Hugo.
2025-12-01 15:18:22 +00:00
Jan Edmund Lazo
5196162540 feat(version): support multiple Vim versions
Group up to 15 vimpatch numbers in 1 line to guard against
'make formatc'.
1-liner for vim_versions, num_patches.

Automate '*Version' to remove version.h macros.

'-V1 -v' lists merged Vim versions.
2025-12-01 02:34:51 -05:00
Jan Edmund Lazo
361671870e feat(vim-patch.sh): -M lists all ported patches
Start from current "v:version".
Exclude reverted patches.
Normalize left-zero-pad patch numbers to avoid grep inverse pattern
file like scripts/vim_na_regexp.txt.
Track reverted patches in vimpatch_token_reverts.txt
because no convention in git-log.

TODO: Track patch numbers per v:version in version.c.
2025-12-01 02:34:51 -05:00
zeertzjq
5299967551 vim-patch:8.0.0287: debug mode: cannot access function arguments (#36772)
Problem:    Cannot access the arguments of the current function in debug mode.
            (Luc Hermitte)
Solution:   use get_funccal(). (Lemonboy, closes vim/vim#1432, closes vim/vim#1352)

c7d9eacefa

This patch was regressed in e50b545676.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-12-01 13:19:27 +08:00
zeertzjq
b12ba37bcd Merge pull request #36771 from zeertzjq/vim-9.1.1937
vim-patch:9.1.{1937,1938,1939}
2025-12-01 11:34:59 +08:00
zeertzjq
d13e8f1a34 vim-patch:9.1.1939: tests: test_matchfuzzy() leaves swapfiles behind
Problem:  tests: test_matchfuzzy() leaves swapfiles behind
Solution: Close loaded buffers using "%bw"

6e9694df10

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-01 11:06:39 +08:00
zeertzjq
c9f63d13b6 vim-patch:9.1.1938: tests: excessive wait in Test_matchfuzzy_initialized
Problem:  tests: excessive wait in Test_matchfuzzy_initialized
Solution: Use term_wait() instead of the TermWait() wrapper
          (Corey Hickey)

Test_matchfuzzy_initialized is a terminal test, which are specified to be
"flaky" and automatically retried. The TermWait wrapper multiplies the
specified wait time by higher values for later retries, maxing out at
10x the specified value. This makes tries vim/vim#3 to vim/vim#6 sleep for 20 seconds
each, which makes the test very slow to work with. The specified intent
of the test (as noted in a comment eight lines above here) is to
sleep for 2s.

closes: vim/vim#18822

d4f9de889b

Co-authored-by: Corey Hickey <bugfood-c@fatooh.org>
2025-12-01 11:06:39 +08:00
zeertzjq
3c60598239 vim-patch:9.1.1937: tests: Test_matchfuzzy_initialized() fails
Problem:  tests: Test_matchfuzzy_initialized() fails
Solution: Send a dummy key (Corey Hickey)

Test_matchfuzzy_initialized seems to expect that the 'lvimgrep' will be
interrupted by sending a SIGINT. If the search finishes beforehand,
though, then the SIGINT triggers vim to tell the user how to quit.

Vim does not show this message immediately, though; instead, vim shows
the message next time it is active. When StopVimInTerminal() sends a key
sequence intended to cause vim to quit, this activates vim to show the
message instead of quitting.

I do not understand every detail of the problem fully--if I type the
characters from StopVimInTerminal() into a post-SIGTERM terminal
directly, that seems to work ok; there seems to be a timing issue due to
sending all the characters at once.

This fix does make the test work reliably for me, and the test still
works even if I limit my CPU frequency so that the search is interrupted
by the SIGINT.

fixes: vim/vim#18821
related: vim/vim#18822

a3925d783a

Co-authored-by: Corey Hickey <bugfood-c@fatooh.org>
2025-12-01 11:06:39 +08:00
Olivia Kinnear
acfb9bc614 feat(lsp): graduate ClientConfig exit_timeout #36750
Problem:
The `flags` field calls its sub-fields "experimental".
But `exit_timeout` is now used for multiple purposes.

Solution:
Graduate `exit_timeout` to a top-level ClientConfig field.
2025-11-30 21:41:43 -05:00
zeertzjq
3f8e51cee7 vim-patch:9.1.1936: filetype: Erlang lexical files are not recognized
Problem:  filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
          filetype plugins (Jon Parise).

leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.

This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.

Reference:
-  https://www.erlang.org/doc/apps/parsetools/leex.html

related: vim/vim#18819
closes: vim/vim#18832

b087c5452b

Co-authored-by: Jon Parise <jon@indelible.org>
2025-12-01 10:11:34 +08:00
zeertzjq
8310f20526 vim-patch:9.1.1935: filetype: not all Erlang files are recognized
Problem:  filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
          (John Parise).

*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)

Reference:
- https://www.erlang.org/doc/system/applications.html

Rebar is the Erlang build tool. rebar.config uses Erlang syntax.

Reference:
- https://rebar3.org/docs/configuration/configuration/

closes: vim/vim#18835

2b2580e61a

Co-authored-by: Jon Parise <jon@indelible.org>
2025-12-01 10:11:34 +08:00
Tristan Knight
23ddb2028b feat(lsp): semanticTokens/range #36705
Problem:
Nvim supports `textDocument/semanticTokens/full` and `…/full/delta`
already, but most servers don't support `…/full/delta` and Nvim will try
to request and process full semantic tokens response on every buffer
change. Even though the request is debounced, there is noticeable lag if
the token response is large (in a big file).

Solution:
Support `textDocument/semanticTokens/range`, which requests semantic
tokens for visible screen only.
2025-11-30 21:06:56 -05:00
CompileAndConquer
f9ef1a4cab fix(buffer): defer w_buffer clearing to prevent dict watcher crash #36748 2025-11-30 20:56:53 -05:00
zeertzjq
cdc6f85111 vim-patch:a4c43a6: runtime(vim): Update base syntax, match full :language command (#36766)
closes: vim/vim#18808

a4c43a6cf5

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-12-01 09:24:33 +08:00
zeertzjq
14d65dae91 fix(buffer): don't allow changedtick watcher to delete buffer (#36764) 2025-12-01 09:14:14 +08:00
fredizzimo
6ebeb07c56 feat(api): experimental nvim__exec_lua_fast #35758
Problem:
Remote UIs can't execute lua code when a blocking prompt is waiting for
input. This is needed when implementing IME pre-edit for example.

Solution:
Add an `nvim__exec_lua_fast` experimental API function, which is allowed
to run instead of being queued until after the message has been shown.
2025-11-30 19:27:02 -05:00
Justin M. Keyes
d62bbe24cb fix(tui): enable vtpcon strikethrough feature #36762
Problem:
Strikethrough was not enabled for vtpcon thus preventing strikethrough
text from being shown.

Solution:
Update `windows.ti`.

Co-authored-by: ymich9963 <gmichael834@gmail.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-11-30 11:22:12 -05:00
zeertzjq
8c1327a622 vim-patch:49f731d: runtime(doc): Improve :help :catch command specification (#36758)
The pattern argument is optional.  See :help :sort for another example.

closes: vim/vim#18834

49f731d243

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-30 18:55:38 +08:00
Olivia Kinnear
12d4c624bb feat(ex_cmds): consistent :restart behavior (#36723) 2025-11-30 02:14:28 -08:00