10866 Commits

Author SHA1 Message Date
Barrett Ruth
784765cb73 fix(winbar): update hidden tabpages on global 'winbar' change #40608
Problem:
Changing global 'winbar' only updates window layout state in the current
tabpage. This means existing hidden tabs can keep stale winbar height.

Solution:
Recompute winbar state for all tabpages on global `'winbar'` changes.
2026-07-10 12:49:52 -04:00
Barrett Ruth
3b88a8a65d fix(filetype): ensure directory bufname ends w/ slash sep #40552
Problem:
`vim.filetype.match()` needs a cheap way to recognize directory buffers
without doing filesystem stat work.

Solution:
Ensure full buffer names for directories end in a trailing slash. Now
directory buffers can proceed through the normal 'filetype' path.

Note side-effects: session and ShaDa buffer-list restore behavior must
be compatible, so those + corresponding tests must be updated.
2026-07-10 12:40:13 -04:00
Barrett Ruth
20a4b1bc5e fix(dir): user/plugin can override default "-" mapping #40676 2026-07-10 11:52:24 -04:00
Justin M. Keyes
d79c787f27 refactor(ctx): ctx_restore_curwin #40667
unify context-switching logic.

1. `prevwin` is now restored for all targets (was buf-only).
   - add a `nvim_win_call` test.
2. The buf-found "restore the shown buffer" dance no longer depends on
   the origin window: it runs even if the callback closed the origin.
2026-07-10 07:58:02 -04:00
Justin M. Keyes
6bb1aa74e6 refactor: unify context-switching concepts 2026-07-10 03:27:37 +02:00
Justin M. Keyes
982d2f2531 fix(test): screen:expect({none=…}) with no any/grid
Problem:
`screen:expect({none=…})` with no any/grid crashed (concat on nil)
because actual_rows was only rendered when any or grid was present.

Solution:
Update the condition.
2026-07-10 00:06:59 +02:00
Barrett Ruth
7dccbfed10 fix(dir): select origin on parent navigation #40658 2026-07-09 17:47:56 -04:00
MAAZIZ Adel Ayoub
de141b4679 fix(socket): --listen silently truncates long paths #40625
Problem:
A `--listen` path longer than the system socket path limit (~104 bytes on
macOS, 108 on Linux) is silently truncated by `uv_pipe_bind()`. Nvim either
serves a socket at a different path than `v:servername` reports, or fails with
an error that blames the full untruncated path (confusing):

    nvim: Failed to --listen: address already in use: "<full path>"

Steps to reproduce:

    $ nvim --listen /var/folders/g7/9y_ydbnj2fs_fvp8xf44p8gc0000gn/T//nvim/-Users-rpatterson-Projects-src-github.com-neovide-neovide --embed -p
    nvim: Failed to --listen: address already in use: "/var/folders/g7/9y_ydbnj2fs_fvp8xf44p8gc0000gn/T//nvim/-Users-rpatterson-Projects-src-github.com-neovide-neovide"

    $ ls /var/folders/g7/9y_ydbnj2fs_fvp8xf44p8gc0000gn/T//nvim/-Users-rpatterson-Projects-src-github.com-neovide-neovide
    "/var/folders/g7/9y_ydbnj2fs_fvp8xf44p8gc0000gn/T//nvim/-Users-rpatterson-Projects-src-github.com-neovide-neovide": No such file or directory (os error 2)

    $ ls -l /var/folders/g7/9y_ydbnj2fs_fvp8xf44p8gc0000gn/T//nvim/
    srwxr-xr-x@ - rpatterson 31 Mar 10:24 -Users-rpatterson-Projects-src-github.com-neovid

Solution:
Bind with `uv_pipe_bind2()` and `UV_PIPE_NO_TRUNCATE` (libuv 1.46+), so
a too-long path fails up front with the actual reason:

    nvim: Failed to --listen: invalid argument: "<full path>"
2026-07-09 16:07:17 -04:00
Barrett Ruth
a54a7f6a78 fix(dir): preserve alternate buffer #40659 2026-07-09 15:41:09 -04:00
Nathan Zeng
c0a16a5977 feat(restart)!: ZR restores session #40498 2026-07-09 07:09:12 -04:00
Evgeni Chasnovski
fce6d9a549 feat(lua): add cwd context to vim._with() #40653
Problem: No concise way to execute a callback with temporarily set
  working directory. This might be useful when sourcing nested files to
  allow them to assume that current working directory is their root
  directory.

Solution: Add `cwd` context to `vim._with().`
2026-07-09 07:07:14 -04:00
zeertzjq
7c9222f45e fix(mouse): reset click count on next click if mouse moved (#40637)
Also, drop drag event if the mouse hasn't moved, like in gVim.
2026-07-09 08:40:00 +08:00
Justin M. Keyes
d55252a3ec refactor(logging)!: rename current_level #40642 2026-07-08 20:15:42 +00:00
Evgeni Chasnovski
0653e7a338 feat(pack): 'packlockfile' option #40562
Problem: No way to configure the lockfile location.

Solution: Add 'packlockfile' option.
2026-07-08 12:23:28 -04:00
Oleh Volynets
ef130902cf fix(lsp): clear push diagnostics on detach #40634
Problem: when an LS client detaches from the buffer, only pull diagnostics
are cleared via capability framework. Push diagnostics remain stuck even
when client stops/restarts.

Solution: clear push diagnostics on client detach.

ref #33864
2026-07-08 12:00:21 -04:00
Caleb White
653f2092ce fix(lsp): refresh document-pull buffers on workspace/diagnostic/refresh #40623
When a server supports both document and workspace pull diagnostics,
`on_refresh` only dispatched a `workspace/diagnostic` request.  The
workspace response handler skips buffers with `pull_kind == "document"`
(i.e. all buffers opened by the user), so their diagnostics went stale
until the next `didChange` or `didOpen` event.

Change `on_refresh` to always refresh document-pull buffers via
`textDocument/diagnostic`, regardless of whether the server also
supports workspace diagnostics.  This ensures that opened buffers
see updated diagnostics (e.g. after a save triggers an external
tool like PHPStan) without requiring the user to re-enter insert
mode.
2026-07-08 07:26:22 -04:00
jdrouhard
6a6431cb99 refactor(lsp): use LspNotify for codelens #40604
Problem: The codelens LSP module was using its own raw buffer events and
its own debounce mechanism for refreshing code lens in attached buffers.

Solution: Switch the module to using the LspNotify autocmd events.
LspNotify fires just after document versions are synced with the server
and provides a built in debounce mechanism for changes.

Additionally, this fixes some bugs with the previous implementation:

1. The workspace/codeLens/refresh handler  re-requested codelens for all
   buffers but when the response came back, it forced an extra redraw
   after clearing the work the handler had just done.
2. Document synchronization was reworked to be more resilient to
   multiple clients providing codelens for a single buffer. The latest
   document version is now separately tracked per client (and per
   client's lenses per row) instead of for the buffer as a whole. This
   allows the on_win() function to properly redraw all codelens even
   when different clients' responses for a particular document version
   come back at different times.
2026-07-07 12:23:59 -04:00
Barrett Ruth
5231ad1357 fix(terminal): avoid E676 after failed :wqa (#40620) 2026-07-07 01:41:11 +00:00
Justin M. Keyes
b5f500263b fix(lua): bufwrite message overridden by :redrawstatus
Problem:
bufwrite message overridden by :redrawstatus command within Progress callback.

Solution:
- don't use globally-shared IObuf.
- use vim_snprintf to deduplicate `nlua_call_luaeval`, `nlua_call_vlua`.

fix https://github.com/neovim/neovim/issues/40616
2026-07-06 22:17:25 +02:00
Barrett Ruth
aff618536b fix(shada): persist cleared registers #40601
Problem:
Clearing a register via `:let @a = ""` doesn't persist in shada.

Solution:
Follows the precedent of ee56daebb6 .
Namely, when the live register is empty and *at least as recent* as the copy
that is on disk, drop it instead of writing it back.
2026-07-06 09:40:17 -04:00
Barrett Ruth
af9f24b80b fix(shada): persist cleared search patterns #40600
Problem:
`:let @/ = ""` doesn't stick after restart (the old search pattern comes back).

Solution:
When the current session cleared the pattern more-recently than stored
shada entry, drop the shada entry instead of restoring it.

Note: similar timestamp-based suppression was used for deleted
marks: ee56daebb6
2026-07-06 09:36:02 -04:00
prwang
732bf4db97 fix(input): stops accepting input after a large paste/input burst #40585
Problem:
Neovim can permanently stop accepting keyboard input after a large paste, or after
any sufficiently large input burst. The screen still redraws and honours window
resize, but typed keys have no effect and the session must be killed. A paste that
triggers the freeze is applied only partially.

Root cause:

`src/nvim/os/input.c` holds `input_buffer[INPUT_BUFFER_SIZE]` (16386 bytes),
compacted left rather than used as a ring:

- `input_get()` drains the buffer by advancing `input_read_pos`, but never rewinds
  the cursors when it empties (`input_read_pos == input_write_pos`).
- The only rewind lives in `input_enqueue_raw()`, which `input_enqueue()` reaches
  only inside `while (input_space() >= 19 && ptr < end)` (19 is the maximum
  expansion of one `<x>` key form).

So once input fills the buffer to within 19 bytes of the top and is then fully
drained, the cursors are pinned near the top with `input_space() < 19`. The gate
never reopens, `input_enqueue()` never rewinds, and all further input is silently
dropped: `input_available()` stays 0 and the editor blocks forever in
`state_enter()` → `input_get()`. Redraw and resize run on independent paths, which
is why the UI looks alive while the keyboard is ignored.

Solution:
Rewind the read/write cursors when the buffer is empty, at the start of
`input_enqueue()`. The reset moves no data in the empty case and guarantees the
space gate can reopen; the non-empty case self-heals as the editor drains.

Test case:
A reproducer (no terminal required; drives `nvim --embed` over msgpack-RPC via
`nvim_input`) floods the input buffer, lets the editor drain it, then probes with
`:qa!`. It shows a sharp threshold at `INPUT_BUFFER_SIZE − 18`:

| `--fill` | master    | with this fix |
|----------|-----------|---------------|
| ≤ 16367  | quits     | quits         |
| ≥ 16368  | **hangs** | quits         |

- On current `master`, the freeze reproduces at `fill=16368`; the patched build
  quits for every fill up to 100000.
- Interactive: a ~40 kB bracketed paste into Insert mode or a `:terminal` no longer
  freezes.
2026-07-06 08:37:02 -04:00
bfredl
349f810eed refactor(test): unify XDG path handling (cmake vs zig)
fixes #40381
2026-07-06 10:55:20 +02:00
Barrett Ruth
dbe59b5457 test(lsp): retry on-type formatting assertions #40602 2026-07-05 18:07:16 -04:00
Nathan Zeng
47958bb4db fix(:restart): remove -S [file] from v:argv #40521
Problem:
Session files specified at startup `-S [file]`, logically conflict
with `:restart`.

Solution:
Remove `-S [file]` from `v:argv` when doing :restart.
Also for the "bang" variant `:restart!`, just because it's
simpler (if anyone reports a use-case later, we can revisit).
2026-07-05 17:53:45 -04:00
Justin M. Keyes
8dfe4d6629 fix(api): nvim_win_resize tweaks #40596 2026-07-05 13:22:16 -04:00
jdrouhard
1f18ea1cf7 feat(lsp): convert inlay_hint to capability framework #40569
Problem:
Inlay hints used separate global and per-buffer bufstates tables and
bespoke global autocmds for managing the inlay hint state across buffers
and clients, duplicating the lifecycle logic already provided by the
Capability framework. This caused inconsistencies in how client state
was handled and inlay hint state lifecycle was managed compared to other
LSP features.

Solution:
Replace the ad-hoc bufstate tracking and global autocmds in
vim.lsp.inlay_hint with a proper InlayHint subclass of Capability.

This also refactors the way inlay hint state is managed and fixes bugs I
found while doing this:

1. For each line with inlay hints, the list of the hints along with
   whether they have been applied is stored in a current result on the
   client state. This allows the on_win decorator to clear all inlay
   hints for an old document version once, and then re-add the new
   version's hints line-by-line as they are drawn to the screen,
   modeling the semantic tokens module.
2. It fixes problems with mixing results from multiple clients attached
   to the buffer by fully moving each client's state to its own table.
   Previously, only the most recent document version used to populate a
   line's inlay hints was stored, but there was no distinction for which
   client the hints may have come from. (Fixes #36318)
3. It fixes the workspace/inlayHint/refresh server->client notification
   behavior. Previously it would only re-request inlay hints for buffers
   currently displayed in a window but would not invalidate them in
   non-displayed buffers (or provide any mechanism for those buffers to
   re-request at a later time). Model semantic token module here again
   by invalidating all buffers, and adding a BufWinEnter autocmd to
   refresh hints.
4. Add a mechanism to cancel in-flight requests if a new request for a
   newer document version is made before the last one returned
5. Handle stale results by simply dropping them.
2026-07-05 12:47:30 -04:00
Justin M. Keyes
e494c4777b fix(test): screen:expect() render crash masks the real failure #40593
Problem:
When screen:expect() fails, it renders a snapshot for the error
message. If the grid references a highlight id that was never defined
via "hl_attr_define", the renderer crashes:

    screen.lua:1910: attempt to index local 'entry' (a nil value)

This hides the actual failure, and appears "flaky": it only fires on the
failure path, and only when the shared screen is missing an id the grid
still references. A screen created in setup() attaches mid-session, so
highlight ids allocated before it attached (still referenced by stale
grid cells) are never sent to it.

Solution:
- Don't crash while rendering a diagnostic: show undefined highlight ids
  as "UNKNOWN_HL_ID(n)", so the real failure and the desync are legible.
- put_spec: fix `visualbell` typo. If it fails again then we can find
  the actual root cause.

ref https://github.com/neovim/neovim/issues/36250
2026-07-05 12:08:41 -04:00
Justin M. Keyes
a0fd59352a Merge #40520 nvim_win_resize 2026-07-05 12:06:13 -04:00
XiaowenHu96
e18d2838b5 fix(test): skip flaky Test_set_cursor
Problem:
Test_set_cursor is flaky in CI. MsgPack::Raw Perl module
has a heap-overflow issue.
See https://github.com/jacquesg/p5-MsgPack-Raw/issues/4

Solution:
Skip the test until the upstream module is fixed.
2026-07-05 21:47:37 +08:00
XiaowenHu96
ce718e31f4 feat(api): add nvim_win_resize()
Ref #6645

Problem:
When a window is resized it takes space from the window right/below first,
and only falls back to the window left/above when there is no more room.
Sometimes a user wants the space to come from a specific direction.

Solution:
Add nvim_win_resize(win, width, height, {anchor}) which resizes a window
with a choosable anchor edge, letting a window grow leftwards or upwards
by taking space from the window to the left or above first. The default
anchor reproduces nvim_win_set_width()/nvim_win_set_height().
2026-07-05 21:47:34 +08:00
Barrett Ruth
81e01a80b9 fix(lsp): support -1 column in format range #40570
Problem:
`vim.lsp.buf.format()` accepts ranges using nvim indexing, where an
end column of -1 means end of line. LSP ranges cannot use that,
which is confusing for things like range formatting.

Solution:
Resolve -1 end columns to the line length before converting the range to
LSP positions.
2026-07-05 06:14:55 -04:00
dqnne
0f86ea5ed8 fix(health): always set 'modifiable' #40584
Problem:
When buffers are by default `nomodifiable`, such as when Nvim starts with
`-M`, the health buffer cannot be updated.

Solution:
Always set `modifiable` before modifying the buffer.
2026-07-05 06:09:27 -04:00
Justin M. Keyes
3b8c19ea46 fix(bufwrite): cursor flicker on :write
PROBLEM:
Cursor briefly flickers in cmdline when the "written" message is printed
(very noticeable in Neovide with cursor animation).

SOLUTION:
- Mark UI "busy" (cursor hidden) while emitting the message, as done for
  the search message (cb2ca54331).
- Note: ff68fd6b8a moved the message from `filemess()` into
  `buf_write..msg_progress`.
- Fix a bug in `tui.c:flush_buf` which manifested after this change. See
  ANALYSIS below. https://github.com/libuv/libuv/issues/5182

ANALYSIS:
After this change...

    ui_busy_start();
    set_keep_msg(msg_progress(IObuff, msg_id, "success", 0, true, true), 0);
    ui_busy_stop();

...ASAN analyzer fails on tui_spec.lua test "with non-tty (pipe) stdout/stderr":

    2026-07-04T14:09:28.9521023Z = ==32405==ERROR: AddressSanitizer: ABRT on unknown address 0x03e900007e95
    ...
    4 0x7f5506a288fe in abort stdlib/abort.c:79:7
    5 0x559afd7113a2 in uv__epoll_ctl_flush
    build/src/libuv/src/unix/linux.c:1335:7
    6 0x559afd710a81 in uv__io_poll
    build/src/libuv/src/unix/linux.c:1448:9
    7 0x559afd6f67a7 in uv_run
    build/src/libuv/src/unix/core.c:460:5
    8 0x559afd2a72cc in flush_buf
    nvim/tui/tui.c:2642:5
    9 0x559afd2bce9f in tui_flush
    nvim/tui/tui.c:1747:3
    10 0x559afd2f39a0 in ui_client_event_flush
    nvim/auto/ui_events_client.generated.h:64:3
    11 0x559afcb8e014 in parse_msgpack
    nvim/msgpack_rpc/channel.c:255:11
    12 0x559afcb840e7 in receive_msgpack
    nvim/msgpack_rpc/channel.c:217:5
    13 0x559afc53b2af in read_event
    nvim/event/rstream.c:180:23
    14 0x559afc53ad52 in invoke_read_cb
    nvim/event/rstream.c:233:3
    15 0x559afc5382d6 in read_cb
    nvim/event/rstream.c:135:3
    16 0x559afd707b25 in uv__read
    build/src/libuv/src/unix/stream.c:1145:7
    17 0x559afd70744a in uv__stream_io
    build/src/libuv/src/unix/stream.c:1208:5
    18 0x559afd6f727e in uv__io_cb
    build/src/libuv/src/unix/core.c:930:5
    19 0x559afd710d7a in uv__io_poll
    build/src/libuv/src/unix/linux.c:1546:11
    20 0x559afd6f67a7 in uv_run
    build/src/libuv/src/unix/core.c:460:5
    21 0x559afc526e2d in loop_uv_run
    nvim/event/loop.c:59:3
    22 0x559afc526aa4 in loop_poll_events
    nvim/event/loop.c:80:26
    23 0x559afd2fdbb7 in ui_client_run
    nvim/ui_client.c:172:5
    24 0x559afc920d7b in main /home/runner/work/neovim/neovim/src/nvim/main.c:355:5
    25 0x7f5506a2a1c9 in __libc_start_call_main
    main.h:58:16
    26 0x7f5506a2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
    27 0x559afbd6d254 in _start

The abort requires two rare conditions:
1. a `uv_write` whose buffer array *ends* in a zero-length buffer, which only
   happens by "flush while cursor-hidden".
2. an output fd that *epoll cannot watch*. The only CI test with such an fd is
   tui_spec.lua "with non-tty (pipe) stdout/stderr", which runs a TUI with
   `stdout > /dev/null`, then runs `:w testF`, which triggers the "written"
   message.

Our change guarantees trailing-empty flushes (`:w` fires busy + `ui_flush()`
while busy) in the only test that runs a TUI on `/dev/null`.

0. In a normal (non-busy) no-sync flush, post always contains `cursor_normal`.
1. Our change emits:
   ```
   busy_start → msg_progress("…written") → ui_flush → busy_stop
   ```
2. TUI flushes *while busy*, so `should_invisible() = true` and `flush_buf`
   skips the cursor-restore string (`bufs[2]` is zero-length).
3. libuv *cannot complete* a write whose tail is a zero-length buffer: EVERY
   trailing-empty write goes through epoll, even when every byte was already
   written. https://github.com/libuv/libuv/issues/5182
4. In `tui_spec.lua:3298`, the output fd is `/dev/null`, whose kernel
   `file_operations` has no `.poll` method (`drivers/char/mem.c`), so
   `EPOLL_CTL_ADD` fails with `EPERM`.

Trailing empty buffers are semantically pointless, and libuv punishes
them: forced async, one epoll round-trip *per trailing empty*, plus
a 0-byte `write()` syscall.

Helped-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Helped-by: Fred Sundvik <fsundvik@gmail.com>
2026-07-04 23:17:27 +02:00
Barrett Ruth
d0a262db88 feat(channel): add ChanClose event #40568
Problem:
Plugins using RPC sockets cannot detect when the peer closes a
`sockconnect()` channel, so reconnect logic has no reliable trigger.

Solution:
Add a `ChanClose` event with channel info before the channel is removed,
matching the existing `ChanOpen`/`ChanInfo` event model.
2026-07-04 15:21:25 -04:00
Justin M. Keyes
00917aa6f6 test: unreliable "stdpath() avoids DOS 8.3 filenames" #40574
Problem:

    FAILED   …/defaults_spec.lua @ 1286: stdpath() avoids DOS 8.3 filenames for "cache" and "run"
    Expected values to be equal.
    Expected:
    "XTEST_~1"
    Actual:
    "XTEST_~2"
    stack traceback:
    …/defaults_spec.lua:1296: in function <…/defaults_spec.lua:1286>

Solution:
Relax the test.
2026-07-04 13:03:51 +00:00
Manoj Panda
9456cec7f9 vim-patch:9.2.0769 conversion to utf-16be using iconv is inconsistent #40567
fix(iconv): conversion to utf-16be using iconv is inconsistent

vim-patch:9.2.0769

Problem:  enc_canonize function changes utf-16be to utf-16 but in linux
          type utf-16 defaults to utf-16le.

Solution: Creating a separate entry for utf-16be in enc_canon_table.
          Note: the effect is only visible on iconv implementations that
          treat "utf-16" and "utf-16be" differently, so the test does
          not necessarily fail on an unpatched Vim. But the bug is
          visible in vim.iconv. (Manoj Panda)

from: vim/vim@2a63f74
closes: neovim#40262

Signed-off-by: Manoj Panda <manojpandawork@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-07-04 11:50:38 +00:00
zeertzjq
60e46704bd vim-patch:9.2.0782: tests: missing cleanup in test_mksession.vim
Problem:  Some test_mksession tests do not cleanup all the state
Solution: Add commands to clean up state introduced by the test
          (Illia Bobyr)

Before this change the following 4 tests were failing when executed
individually:

  Test_mksession_arglocal_localdir
  Test_mksession_buffer_count
  Test_mksession_one_buffer_two_windows
  Test_mksession_winminheight

As in
```
  TEST_FILTER=winminheight make test_mksession
```
Yet, when ran as part of the whole test suite they succeeded.

This was due to some state leaking from one test into another.

I think this is bad, as it can confuse someone making changes in the
relevant area.

`Test_mksession_winminheight` is actually still broken a bit, and
requires `winheight` and `winwidth` set at the beginning of the test,
rather than later, when it actually matters.  This exposes a subtle bug
in the session restore script.  I have a patch in a separate commit.

closes: vim/vim#20691

834b8d218f

Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2026-07-04 08:47:05 +08:00
zeertzjq
d7b7922dcb vim-patch:partial:9.2.0579: :mksession, :mkview and :mkvimrc emit legacy Vim script
d69cf0dbcf

New tests only.

Co-authored-by: Miguel Barro <miguel.barro@live.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-04 08:45:47 +08:00
zeertzjq
b5fd22e771 vim-patch:9.2.0781: tests: Test_fuzzy_completion_bufname_fullpath() creates unnecessary dir (#40565)
Problem:  tests: Test_fuzzy_completion_bufname_fullpath() creates an
          unnecessary directory with the name of a file.
Solution: Only create the parent directory of the file (zeertzjq).

closes: vim/vim#20695

98efa50279
2026-07-03 23:17:49 +00:00
zeertzjq
87c2319986 vim-patch:9.2.0763: tests: style issue in test_plugin_netrw (#40543)
Problem:  tests: style issue in test_plugin_netrw (after v9.2.0761)
Solution: Clean-up newly created directory, use consistent concat
          operator

1ebd2fdb78

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-03 08:18:01 +08:00
Barrett Ruth
7325e3b55a fix(dir): define "-" (up/parent) mapping earlier #40531
Problem:
The dir.lua "-" mapping cannot be easily overridden (because of autocmd
ordering).

Solution:
- Move it to defaults.lua.
- Also to be extra polite: fall back to builtin `-` motion if the user
  disabled the `dir.lua` plugin.
2026-07-02 15:55:48 -04:00
zeertzjq
3210315559 vim-patch:9.2.0426: tests: still some flaky screendump tests
Problem:  tests: still some flaky screendump tests
          (James McCoy)
Solution: Replace flaky VerifyScreenDump checks with assert_* assertions
          for Test_visual_block_scroll and Test_scrolloffpad_with_folds,
          and remove the now-unused dump files, mark those tests as
          flaky (which happened previously for screendump tests
          automatically) (Yasuhiro Matsumoto).

fixes:   vim/vim#20096
related: vim/vim#20095

cf5d7102b9

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-07-02 21:07:19 +08:00
zeertzjq
562b3fcb05 vim-patch:9.2.0401: tests: still a few flaky tests
Problem:  tests: still a few flaky tests
Solution: Add WaitForAssert to test_messages.vim, use a smaller terminal
          window for test_tabpanel, add TermWait() in test_messages
          to handle DECQRM messages.

closes: vim/vim#20074

0bc64b19a2

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-02 21:07:03 +08:00
zeertzjq
b4901ae0b6 vim-patch:9.2.0392: tests: Some tests are flaky
Problem:  tests: Some tests are flaky and cause CI to fail
Solution: Add WaitForAsserts() calls to reduce flakiness

closes: vim/vim#20050

1940bcb243

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-02 21:06:47 +08:00
zeertzjq
6003545f38 vim-patch:9.2.0761: runtime(netrw): Unix: unable to open '\' file (#40533)
Problem:  runtime(netrw): Unix: unable to open '\' file
Solution: Adjust directory pattern (Manoj Panda)

closes: vim/vim#20685

86d8af37ba

Co-authored-by: Manoj Panda <manojpandawork@gmail.com>
2026-07-01 23:45:14 +00:00
zeertzjq
a243486a46 vim-patch:9.2.0759: Some code for 'autocompletedelay' is no longer needed
Problem:  Some code for 'autocompletedelay' is no longer needed now that
          'autocompletedelay' doesn't block redraw (after 9.2.0739).
Solution: Remove unnecessary code. Also remove a duplicate screendump
          and an outdated comment in test (zeertzjq)

closes: vim/vim#20686

0b86b97cc9
2026-07-02 03:57:56 +08:00
zeertzjq
cef0dcd54e vim-patch:9.2.0755: 'autocomplete' behaves inconsistently when recording
Problem:  If 'autocompletedelay' is non-zero, 'autocomplete' doesn't
          work when recording a register (after 9.2.0750).
Solution: Still produce K_COMPLETE_DELAY when recording a register, and
          drop it in gotchars_add_byte() instead (zeertzjq).

This patch only changes the behavior when recording a register.
Replaying a register with 'autocomplete' still doesn't fully work
regardless of 'autocompletedelay', as 'autocomplete' isn't triggered
when there is pending input.

closes: vim/vim#20675

a658728918
2026-07-02 03:57:56 +08:00
zeertzjq
826ca0ccfe vim-patch:9.2.0750: completion: 'autocompletedelay' deferral leaks state
Problem:  After 'autocompletedelay' was made non-blocking, the deferred
          popup can misbehave: a pending autocomplete survives leaving
          Insert mode and then keeps waking the editor in Normal mode,
          the deferral is recorded into registers while recording a
          macro, the popup appears an extra 'updatetime' late when
          'autocompletedelay' is larger and a CursorHoldI autocommand
          exists, CursorHoldI can fire twice without an intervening
          keypress, and an open balloon is dismissed (after v9.2.0739)
Solution: Treat the deferral like CursorHold: only keep it pending in
          Insert mode and not while recording, with pending typeahead,
          or when completion is already active; drop it when Insert mode
          ends; measure the delay from when the user typed so a
          CursorHold in between does not push the popup back; and do not
          let the deferral re-enable CursorHoldI or dismiss the balloon.
          (Hirohito Higashi).

closes: vim/vim#20669

1f0f14bc2f

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 03:57:56 +08:00
zeertzjq
5f47d7ac08 vim-patch:9.2.0749: 'autocompletedelay' interferes with i_CTRL-K
Problem:  'autocompletedelay' interferes with i_CTRL-K (after 9.2.0739).
Solution: Clear the pending autocompltion from the previous key when a
          new key is typed.

closes: vim/vim#20666

0d292e2067
2026-07-02 03:57:56 +08:00