Commit Graph

37320 Commits

Author SHA1 Message Date
penglei
84fd9214cc fix(diagnostic): skip out-of-range lnum in underline handler #40839
Problem:
`vim.diagnostic.handlers.underline.show` throws `E565: Index out of bounds` when
it tries to underline a diagnostic whose `lnum` is past the end of the buffer.
This happens with stale diagnostics set on an unloaded buffer (e.g. via
`bufadd()`) that are drawn only after the buffer is loaded: by then the file on
disk can be shorter than the `lnum` the diagnostic carried. File pickers
(snacks.nvim) that open files via `bufadd` + `:buffer` hit this whenever an LSP
server has already emitted diagnostics for that URI.


Solution:
Skip diagnostics with an out-of-range `lnum` in the underline handler.

Other handlers `M.virtual_text.show()`, `M.signs.show()`, have a similar condition.
2026-07-20 06:59:21 -04:00
Maria Solano
09a4cc8c50 fix(docs): multi-level list dedent indentation #40850
Problem:
The list-item indentation logic in `gen_help_html.lua` tracks `opt.indent` that
only decrements by one level when a list item is less indented than its sibling.
Dedenting across multiple nesting levels at once produces the wrong left margin.

Solution:
Track the exact leading whitespace for each indent level in a `opt.indent_ws` stack:
- On reset or a top-level item initialize the stack with the current item's
  whitespace.
- When indenting deeper push the current whitespace at the new level.
- When dedenting pop every level whose tracked whitespace is deeper than the
  current item (reaching the correct ancestor level).
2026-07-20 05:02:17 -04:00
Barrett Ruth
4121f2cf25 test(api): normalize context comparisons #40854 2026-07-20 04:53:21 -04:00
Barrett Ruth
a787a31490 fix(window): avoid UAF in close_windows (#40853) 2026-07-20 07:48:36 +00:00
Rocco Vaccone
01c4d37959 fix(lsp): preview window converted to normal window is auto-closed (#40770)
Problem:
A floating preview window (hover, signature help) converted to a normal
window (e.g. with CTRL-W_H or nvim_win_set_config()) is still closed by
the open_floating_preview() autocommands, and a later preview may focus
or close it as if it were still a float.

Solution:
When the preview window is no longer floating, remove its auto-close
autocommands and stop tracking it as the buffer's floating preview.

Closes #36659
2026-07-19 17:16:56 -07:00
Barrett Ruth
1dffa35d46 build(deps): bundle tree-sitter-diff parser #40778 2026-07-19 19:55:20 -04:00
Jan Edmund Lazo
d2a3e0e881 vim-patch:8.2.2271: ml_get error when changing hidden buffer in Python (#40833)
Problem:    ml_get error when changing hidden buffer in Python.
Solution:   Block updating folds. (closes vim/vim#7598)

----

"ctx_switch()", "ctx_restore()" obsolete "switch_buffer()" and
"restore_buffer()".
Latter are unused since https://github.com/neovim/neovim/pull/15831.
Mark them as N/A (until some test fails).

----

3e0107ea16

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-07-19 19:51:47 -04:00
Willaaaaaaa
689b45dda3 fix(write): show E17 on all platforms #40595
Problems:
On Windows, `:w somedir` (where somedir is an existing directory
in pwd) shows the misleading `E13: File exists (add ! to override)`
instead of `E17: "somedir" is a directory`.

Solution:
drop unnecessary `#ifdef` guard.
2026-07-19 15:42:59 -04:00
Sébastien Hoffmann
7ba955fe07 fix(statusline): prevent integer overflow with huge item groups #40837
Problem: when PR #40621 removed a 50 cell restriction to item group
minwid, a possible integer overflow was introduced when the added
padding is multiplied with the number of fillchar bytes.

Solution: when there is not enough buffer capacity left, reduce the
number of added fillchars before calculating the number of added bytes.
2026-07-19 13:29:57 -04:00
Justin M. Keyes
61abef3564 ci: combine PR-labeler jobs #40842
Problem:
We have 5 "labeler" jobs, this is kind of nuts, it bloats the CI report,
and also introduces race conditions...

Solution:
Merge 3 jobs into 1 `label` job with multiple sequential steps.
- Eliminates the `needs` chain
- Drops unused `contents:write` permission.
- GITHUB_TOKEN is scoped to the single `gh` step.
  - Note: is the automatic job token (`contents:read` + `pull-requests:write`,
    not a PAT), so worst case is PR/label mischief.

The `ai-assisted` and `request-reviewer` jobs stay separate, bc they are
triggered on different events (not only "opened").
2026-07-19 12:52:49 -04:00
Justin M. Keyes
40ab941f79 test: improve Nvim EOF handling (for Windows CI) #40841
Problem:
Mysterious Windows CI failure points to resource exhaustion, but we have
no visibility/instrumentation:

    RUN      T610 nvim_set_keymap, nvim_del_keymap can set mappings with special characters, lhs: <S-Left>, rhs: <S-Left>: 93.70 ms OK
    RUN      T611 nvim_set_keymap, nvim_del_keymap can set mappings with special characters, lhs: <S-Left>, rhs: <F12><F2><Tab>: 49.48 ms FAIL
    …\testnvim.lua:144: EOF was received from Nvim. Likely the Nvim process crashed.
    stack traceback:
            D:/a/neovim/neovim/test/functional/testnvim.lua:144: in function 'nvim_set_keymap'
            …/api/keymap_spec.lua:769: in function <…/api/keymap_spec.lua:768>
    RUN      T612 nvim_set_keymap, nvim_del_keymap can set mappings with special characters, lhs: <S-Left>, rhs: <Space><Tab>: 18.49 ms FAIL
    …\testnvim.lua:144: EOF was received from Nvim. Likely the Nvim process crashed.
    stack traceback:
            D:/a/neovim/neovim/test/functional/testnvim.lua:144: in function 'nvim_set_keymap'
            …/api/keymap_spec.lua:769: in function <.../build/Xtest_xdg_api/test/functional/api/keymap_spec.lua:768>

Solution:
Append the child exit-code and signal to the "EOF … crashed" message.

Example:

    Nvim EOF (crash?) exit code: 42 (0x0000002A)

On the next failing Windows run, the first crash line will classify the failure:
- 0xC0000005 → access violation (nvim bug)
- 0xC0000374 → heap corruption (nvim bug)
- spawn/resource error or "clean" exit-code → system resource exhaustion
2026-07-19 12:45:40 -04:00
Justin M. Keyes
d1b3a9924d feat(api): mark nvim_create_autocmd as api-fast #40836
Problem:
nvim_create_autocmd() isn't |api-fast|, so modules that create autocmds
(e.g. vim.treesitter.query) can't be require()d in a fast event context.

Solution:
Mark it |api-fast|. Compile autocmd patterns with RE_NOBREAK so
aucmd_next() won't os_breakcheck() mid-iteration, where a fast
nvim_create_autocmd() could realloc the autocmds vector and dangle the
caller's AutoPat/AutoCmd.

RE_NOBREAK is low-risk because:
- aucmd_next()'s loop checks CTRL-C: `(for (… i < apc->ausize && !got_int; …)`.
- `line_breakcheck()` (`autocmd.c:1912`) runs once per matched autocmd.
- Each autocmd _execution_ runs through `do_cmdline`, which has its own
  breakchecks.

However this does admit risk of a pathological case:
a catastrophic-backtracking glob matched against a very long `User`
event-pattern.

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2026-07-19 11:38:14 -04:00
Artem Krinitsyn
746f5682a7 fix(ui): combine float border with window background #40796
Problem:
Float border highlight groups (FloatBorder, FloatTitle and FloatFooter)
fall back to Normal background highlight if no background color set.

Solution:
Combine border colors with window-local Normal highlight.

Fix #38330
2026-07-19 11:03:46 -04:00
Justin M. Keyes
851656c628 fix(coverity): STRING_OVERFLOW #40835
CID 651340:         Security best practices violations  (STRING_OVERFLOW)
    /src/nvim/keycodes.c: 383             in get_special_key()
    377             data->key = *s;
    378             data->key_alt = (String){ NULL, 0 };
    379           }
    380         }
    381
    382         if ((int)s->size + idx + 2 <= MAX_KEY_NAME_LEN) {
    >>>     CID 651340:         Security best practices violations  (STRING_OVERFLOW)
    >>>     You might overrun the 33-character fixed-size string "string + idx" by copying "s->data" without checking the length.
    383           STRCPY(string + idx, s->data);
    384           idx += (int)s->size;
    385         }
    386       }
    387       string[idx++] = '>';
    388       string[idx] = NUL;
2026-07-19 14:07:18 +00:00
Justin M. Keyes
239125b8c8 feat(eval): declare more "fast" functions #40834 2026-07-19 10:03:53 -04:00
github-actions[bot]
f3ba77ab86 docs: update version.c #40829
vim-patch:8.2.4945: inconsistent use of white space
vim-patch:9.0.1590: filetype test has trailing white space
vim-patch:9.0.1916: Crash when allocating large terminal screen
vim-patch:d086b8f64 runtime(doc): fix inconsistent indent (#14089)
vim-patch:59356019e runtime(doc): align command line table
vim-patch:112505104 runtime(doc): CI: remove trailing white space in documentation
vim-patch:3ca914ec7 runtime(doc): Tweak documentation style a bit
vim-patch:9.1.1352: style: inconsistent indent in insexpand.c
vim-patch:9.1.1363: style: inconsistent indentation in various files
vim-patch:9.1.1366: v9.1.1364 unintentionally changed sign.c and sound.c
vim-patch:45b59a92c runtime(doc): remove trailing whitespace from example in builtin.txt
vim-patch:9.2.0003: tests: invalid indent in message.c
vim-patch:467fe6581 CI: Bump the github-actions group across 1 directory with 2 updates
vim-patch:9.2.0798: Memory leak in compile_expr6() on alloc failure
vim-patch:9.2.0799: Memory leak in compile_def_function_body() on alloc failure

Co-authored-by: marvim <marvim@users.noreply.github.com>
2026-07-19 07:07:03 -04:00
Jan Edmund Lazo
ad3720b882 vim-patch:8.2.1968: Vim9: has() assumes a feature does not change dynamically (#40827)
Problem:    Vim9: has() assumes a feature does not change dynamically.
Solution:   Check whether a feature may change dynamically. (closes vim/vim#7265)

----

"dynamic_feature()" is only for vim9script which is N/A.

----

8cebd43e97

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-07-19 02:33:25 +00:00
zeertzjq
d3c10c6b9c Merge pull request #40826 from zeertzjq/vim-9.2.0792
vim-patch: runtime file updates
2026-07-19 10:04:06 +08:00
zeertzjq
774749e134 vim-patch:ac1bb93: runtime(jinja): Include ftplugin for jinja filetype
closes: vim/vim#20778

ac1bb93421

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-Authored-by: Alejandro Sanchez <hiphish@posteo.de>
2026-07-19 09:45:15 +08:00
zeertzjq
d2776256cd vim-patch:9.2.0792: runtime(netrw): Explore without optional dir broken
Problem:  runtime(netrw): Explore without optional [dir] argument should
          open directory of the current file
Solution: Make it work as documented (Mark Woods)

Broken by fix for vim/vim#20636 in PR vim/vim#20663

related: vim/vim#20663
closes:  vim/vim#20761

1eede2bf02

Co-authored-by: Mark Woods <mwoods.online.ie@gmail.com>
2026-07-19 09:44:13 +08:00
Justin M. Keyes
d09a00126b Merge #40819 from janlazo/na-hunk-c_dev-vimpatch
build(vim-patch): N/A memory/char/string functions, N/A whitespace-only patches
2026-07-18 16:48:03 -04:00
Jan Edmund Lazo
9536d35099 build(vim-patch): ignore amount of whitespace change
Patch 9.1.1363 is N/A after ignoring whitespace.

-----

Unrelated N/A patches
vim-patch:8.1.1985: code for dealing with paths is spread out

https://github.com/neovim/neovim/pull/36125#issuecomment-5012670153
2026-07-18 16:09:17 -04:00
Jan Edmund Lazo
277cb1b431 build(vim-patch): "vim_" char/string N/A funcs
Note this doesn't find new N/A patches by itself
and this is to align with ':h dev-vimpatch'.

Neovim refactored Vim's "char/string" functions to be either safer
(ie. xstrlcat) or target Unicode.
2026-07-18 15:10:03 -04:00
Jan Edmund Lazo
a99f8989f7 build(vim-patch): alloc.c N/A functions
Note this doesn't find new N/A patches by itself
and this is to align with ':h dev-vimpatch'.
I use the 'vim_na_*' files to debug the filtered diff of files
that seem N/A but contain relevant code.
I can't blacklist the entire file.
2026-07-18 14:49:33 -04:00
Justin M. Keyes
6f5fae3f8c fix(lua): vim.keycode cleanup #40817 2026-07-18 14:31:36 -04:00
altermo
a2dfa195b2 feat(lua): vim.keycode() gets structured parse result #38636
Problems:
1. Can't get individual parts of a key-chord separately: modifiers, key.
2. Can't separate a key-combo into individual key-chords.

Solution:
Enhance `vim.keycode()` to optionally return a structured parse result
as a list of key-chords:
- `key_raw` the key-chord (problem 2)
- `mod` the modifiers of `key_raw` (problem 1)
- `key_orig` the key part of the key-chord, only here if differing from `key`
  (this doesn't solve any of the above mentioned problems, but it may provide
  useful and it's (in terms of code) free)
- `key` a normalized version of `key_orig` (solving problem 1), example(the
  first is `key_orig` and second is `key`): `lt` and `<`, `Bar` and `|` (in
  `<C-Bar>`)
2026-07-18 12:20:41 -04:00
zeertzjq
952e59347e vim-patch:9.2.0796: Visual block reselection wrong with 'virtualedit' (#40815)
Problem:  Visual block reselection wrong with 'virtualedit' when line
          lengths are different (Alex Yang, after 8.2.3494).
Solution: Set the entire cursor position to old position when computing
          target curswant, since the check_cursor() added in 8.2.3494
          may change cursor column as well (zeertzjq).

fixes:  vim/vim#20746
closes: vim/vim#20748

8cddbfe468
2026-07-18 23:10:03 +08:00
zeertzjq
8a87b4cc67 vim-patch:9.2.0794: extend() and extendnew() don't handle NULL expr2 properly (#40814)
Problem:  extend() and extendnew() don't handle NULL expr2 properly
          (Mao-Yining)
Solution: Still set the return value when expr2 is NULL (zeertzjq).

fixes:  vim/vim#20758
closes: vim/vim#20759

e397c82a04
2026-07-18 23:09:45 +08:00
Justin M. Keyes
c6d885b0a6 Merge #40813 test: local failures, "succeeded immediately" 2026-07-18 10:48:43 -04:00
zeertzjq
650299fba0 vim-patch:9.2.0787: regexp: code 0x1ecb duplicated for equivalence class (#40808)
Problem:  regexp: code 0x1ecb duplicated for equivalence class
          (Sami Farin)
Solution: Remove it

fixes:  vim/vim#8029#issuecomment-4998990223
closes: vim/vim#20782

c7feefe170

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-18 14:32:30 +00:00
zeertzjq
ee51e7bd11 vim-patch:922d991: runtime(cuda): Fix typo in cuda syntax file (#40810)
related: vim/vim#20773

922d991f77

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-18 22:20:00 +08:00
zeertzjq
721569dd9b vim-patch:9.2.0788: filetype: hip files are not recognized (#40809)
Problem:  filetype: hip files are not recognized
Solution: Detect *.hip files as hip filetype, include filetype, syntax
          and indent plugins, update makemenu.vim and synmenu.vim (Young)

Round out HIP (Heterogeneous-compute Interface for Portability) support
to mirror the existing CUDA files:

- autoload/dist/ft.vim: detect the ".hip" extension as filetype "hip"
- ftplugin/hip.vim: behave like C++ by sourcing ftplugin/cpp.vim
- indent/hip.vim: use cindent, like indent/cuda.vim
- makemenu.vim / synmenu.vim: add a Syntax menu entry

The syntax/hip.vim file already sources syntax/cpp.vim and adds the
HIP-specific keywords, matching syntax/cuda.vim.

closes: vim/vim#20773

b3ad239038

Co-authored-by: Young <young20050727@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 22:19:48 +08:00
Justin M. Keyes
9129bb04ca test(pack): "vim.pack" tests fail on local machine 2026-07-18 16:09:00 +02:00
Justin M. Keyes
cef1140785 test(tui): avoid "Screen test succeeded immediately" warning 2026-07-18 16:09:00 +02:00
Justin M. Keyes
27999c571c test(tui): failures if build lacks terminfo 2026-07-18 16:09:00 +02:00
Justin M. Keyes
99a16121d4 test: unreliable "put command . register special … ring the bell" #40812
Problem:

    FAILED   …/put_spec.lua:894: …/put_spec.lua @ 898: put command . register special tests should ring the bell when deleting if not appropriate
    …/put_spec.lua:894: …/put_spec.lua:898: Bell was not rung after action

    Snapshot:
    screen:expect([[
      ^ine of words 1                                       |
      Line of words 2                                      |
      {1:~                                                    }|*4
      {3:[No Name] [+]                                        }|
                                                           |
      {1:~                                                    }|*4
      {UNKNOWN_HL_ID(4):[No Name]                                            }|
      {UNKNOWN_HL_ID(1):                                                     }|
    ]])
    stack traceback:
    …/ui/screen.lua:917: in function '_wait'
    …/ui/screen.lua:540: in function 'expect'
    …/editor/put_spec.lua:894: in function 'bell_test'
    …/editor/put_spec.lua:940: in function <…/editor/put_spec.lua:932>

Analysis:
The bell was asserted via the UI 'bell' event (screen.bell), but
vim_beep() rate-limits that to 3 per 500ms. These tests share one
long-lived session, so beeps from earlier tests could exhaust the window
and drop the asserted beep.

Solution:
Use assert_beeps()/assert_nobeep(), which check called_vim_beep (set
before the rate-limit gate).
2026-07-18 07:48:36 -04:00
Barrett Ruth
b2bb60d70a fix(ui2): avoid ModeChanged in message window #40788 2026-07-18 07:33:38 -04:00
Christian Clason
7e91f21986 build(deps): bump luajit to 14d8a7a27 2026-07-18 12:54:34 +02:00
zeertzjq
1520a4e3e6 vim-patch:9.2.0786: filetype: Containerfile is not recognized (#40807)
Problem:  filetype: Containerfile is not recognized
Solution: Detect *.[Cc]ontainerfiles as dockerfile filetype
          (Omer Tuchfeld)

closes: vim/vim#20783

Supported by AI.

6b62ae68c6

Co-authored-by: Omer Tuchfeld <omer@tuchfeld.dev>
2026-07-18 17:59:52 +08:00
Justin M. Keyes
5e2ad295c0 test: unreliable ":terminal buffer … partial mappings" #40806
Problem:

    FAILED   …/terminal/buffer_spec.lua @ 348: :terminal buffer is refreshed with partial mappings in Normal mode
    …/terminal/buffer_spec.lua:348: Row 2 did not match.
    Expected:
      |tty ready                                         |
      |*^jjjjjjjjjj                                        |
      |                                                  |
      |                                                  |
      |                                                  |
      |                                                  |
      |                                                  |
    Actual:
      |tty ready                                         |
      |*^jjjjjjjjj                                         |
      |                                                  |
      |                                                  |
      |                                                  |
      |                                                  |
      |                                                  |

Solution:
Increase sleep time.
2026-07-18 05:39:36 -04:00
Justin M. Keyes
9abe01c7be test: unreliable "bumps 'busy' on each watched buffer" #40804
Problem:
Sampling a transient busy=1 pulse is racy under load.

Solution:
Set a long debounce, assert the stable state, then use a short debounce
to let the reload clear it.
2026-07-18 05:01:41 -04:00
Justin M. Keyes
446b9d8c55 docs: misc, remove some old help tags #40214
- Remove old help tags: they add noise to cmdline completion.

Co-authored-by: acehinnnqru <acehinnnqru@gmail.com>
Co-authored-by: KangaZero <samuelyongw@gmail.com>
Co-authored-by: Simone Ragusa <hi@interrato.dev>
Co-authored-by: Chinmay Dalal <~chinmay/public-inbox@lists.sr.ht>
Co-authored-by: coyaSONG <66289470+coyaSONG@users.noreply.github.com>
Co-authored-by: Olivia Kinnear <git@superatomic.dev>
2026-07-18 04:29:51 -04:00
github-actions[bot]
1cb0bbe798 docs: update version.c #40783
vim-patch:98056533b Vim 8.2 release
vim-patch:495282b6e Correct list of patch numbers
vim-patch:85d9b03f8 Correct list of patches.
vim-patch:8.2.2598: Vim9: :open does not need to be supported
vim-patch:8.2.4606: test fails because of changed error message
vim-patch:9.0.0014: missing part of the test override change
vim-patch:9.0.0515: virtual text highlight starts too early when 'number' is set
vim-patch:9.0.0516: virtual text "above" highlights gap after it
vim-patch:9.0.0518: virtual text highlight starts too early with 'nowrap'
vim-patch:9.0.0698: VisVim is outdated, does not work with current Visual Studio
vim-patch:9.0.0833: Mac: no +sound feature in huge build
vim-patch:9.0.1124: virtual text at a column position is truncated
vim-patch:9.0.1463: virtual text truncation only works with Unicode 'encoding'
vim-patch:9.0.1482: crash when textprop has a very large "padding" value
vim-patch:9.0.1695: Crash with overlong textprop above
vim-patch:9.1.0139: MS-Windows: ligatures map cleared on startup
vim-patch:9.1.0368: MS-Windows: Hard to define the Vim Patchlevel with leading zeroes
vim-patch:20393bc02 runtime(doc): update last change date for diff.txt
vim-patch:c49cb93a8 patch 9.1.1392: missing patch number
vim-patch:9.1.1397: tabpanel not correctly updated on :tabonly
vim-patch:9.1.1530: Missing version change in v9.1.1529
vim-patch:689f3bf31 runtime(doc): clarify C99 constraints and portability assumptions
vim-patch:9.1.1589: Cannot disable cscope interface using configure
vim-patch:9.1.1637: FEAT_DIFF used in diff.pro
vim-patch:2d4eb6ee1 runtime(doc): Remove dead link from todo.txt
vim-patch:6d8307fc2 runtime(doc): Add a Development policy
vim-patch:9.1.1982: Use after free with redraw_listener_add()
vim-patch:9.1.2084: Compile error when build with job feature
vim-patch:9.1.2115: CI: wrong preprocessor indentation
vim-patch:9.2.0764: Compiler warning about unused function
vim-patch:b212f440a CI: Bump the github-actions group across 1 directory with 2 updates

Co-authored-by: marvim <marvim@users.noreply.github.com>
2026-07-18 04:20:48 -04:00
Barrett Ruth
12e8db3847 fix(restart): distinguish v:exitreason for :restart! #40801 2026-07-18 04:07:14 -04:00
Kyle
28818702e9 fix(tui): urxvt reset cursor style #40800
Problem:
urxvt doesn't support resetting to default cursor style like we assumed.
https://github.com/neovim/neovim/issues/38987#issuecomment-5004636437

Solution:
Instead of the reset sequence, always set it to steady block. This will
still be wrong for users who configured their initial cursor to
underline, but it's about the best we can do.
2026-07-17 21:07:58 -04:00
glepnir
9fae7234f6 feat(completion): support completionList.applyKind #40769
Problem: values from completionList.itemDefaults always replace the
item's own commitCharacters and data. Since 3.18 a server can ask for
them to be merged instead.

Solution: Handle CompletionList.applyKind and advertise applyKindSupport.
Drop itemDefaults once folded into the items: get_items() runs twice on
the same result and a Merge isn't idempotent.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#completionItemApplyKinds
2026-07-17 21:07:01 -04:00
zeertzjq
a2e36d8df8 vim-patch:528adbd: runtime(netrw): Fix reset_ssl reference error on file rename (#40799)
fixes:  vim/vim#20710
closes: vim/vim#20777
closes: vim/vim#20698

528adbd757

Co-authored-by: yasuda <yasuda@kyoto-sr.co.jp>
Co-authored-by: Doruk Özer <dorukozer@protonmail.com>
2026-07-18 06:44:43 +08:00
zeertzjq
844f045078 vim-patch:9.2.0783: tests: personal spell files leak into later tests (#40798)
Problem:  Test_spelldump_prefixtree_overflow() resets 'runtimepath' to
          defaults, which can expose personal spell files to later tests
          (Jun-ichi Takimoto, after v9.2.0662)
Solution: Save and restore the test runner's 'runtimepath' value (coyaSONG).

fixes:  vim/vim#20765
closes: vim/vim#20766

f16e30e19d

Co-authored-by: coyaSONG <66289470+coyaSONG@users.noreply.github.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
2026-07-18 06:41:02 +08:00
Justin M. Keyes
a373466cd9 test: unreliable "bumps 'busy' on each watched buffer" #40794
Problem:
Test still unreliable.

Solution:
Don't require both 'busy' pulses to coincide.

followup to #40775
2026-07-17 16:45:11 -04:00
Justin M. Keyes
e0e7f65b74 refactor(detach): eliminate nvim__ui_detach #40793
Problem:
`nvim__ui_detach` was added in 85e0559d46 in order to implement
`detach_others` from Lua. Using Lua in this case is doing more harm than
good.

Solution:
Extract `ui_detach_channel`, which also allows it to be used for the
"self detach" path from `ex_detach`.

Bonus: the old MSWIN path always called `os_swap_to_hidden_console()`;
now `ui_detach_channel` only does so for a stdio channel. For the common
stdio TUI this is identical; for a socket UI it's more correct (no
parent console to swap).
2026-07-17 16:37:45 -04:00