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.
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
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#20765closes: vim/vim#20766f16e30e19d
Co-authored-by: coyaSONG <66289470+coyaSONG@users.noreply.github.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
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).
Problem:
Expanding an unknown ~user path falls back to the shell. In a fast event,
this re-enters the event loop and aborts Nvim.
Solution:
Leave unknown users unexpanded when the system account lookup fails.
Filter out `#ifdef` line changes when analyzing C files (*.c, *.h)
via git "-I" flag.
```
-I<regex>
--ignore-matching-lines=<regex>
Ignore changes whose all lines match <regex>. This option may be specified more than once.
```
- https://git-scm.com/docs/diff-options#Documentation/diff-options.txt--Iregex
Problem:
Third-party directory browsers do not have a documented way to take over local
directory buffers from nvim.dir.
Solution:
Document deleting the nvim.dir augroup and handling FileType directory as the
after-startup handoff, and avoid installing the built-in buffer-local "-" mapping
when "-" is already mapped.
The poke_eventloop() and screen:expect() sometimes don't run the test
runner's event loop long enough for the data to arrive at the reading
end of the pipe. Use a screen:expect_unchanged() so that the event loop
can run a bit longer.
FAILED ...ovim/build/Xtest_xdg_api/test/functional/api/ui_spec.lua @ 105: nvim_ui_send works with stdout_tty
Expected values to be equal.
Expected:
"\27]11;?\7Hello world"
Actual:
"\27]11;?\7"
stack traceback:
...ovim/build/Xtest_xdg_api/test/functional/api/ui_spec.lua:138: in function <...ovim/build/Xtest_xdg_api/test/functional/api/ui_spec.lua:105>
Problem: #40731 may still crash if close_buffer autocmds reinsert the float's
grid. Plus removing the grid (and posting win_close) is unneeded if
win_close_othertab refuses to close the window later, which is possible.
Solution: do the stuff before freeing the window, like win_close.
Problem: LSP completion commitCharacters are not handled. Typing a
commit character (e.g. `.`, `(`, `;`) while a completion item is
selected does not accept the item first.
Solution: Store commit characters as a flat string in complete-items.
Check it before completion stops, accept the match and let
the character be inserted normally.
Problem: Closing a floating window from a non-current tab frees its grid
without removing it from the compositor's `layers` table, so the next
`ui_comp_put_grid()` walks a dangling pointer (UAF).
Solution: Call `ui_comp_remove_grid()` (and `ui_call_win_close()` for
multigrid UIs) before `win_free_mem()`, matching `win_close()` since
PR #21551.
Problem: Every LSP capability that sends a request on a document change
to update its state was using its own buffer-local autocmd to do so.
That means there is a separate autocmd per buffer per active
capability/feature, and the actual code inside the autocmd callback was
virtually identical. The same problem occurred for capabilities that had
components to draw on the screen that had their own decoration providers.
Solution: Introduce a central `LspNotify` autocmd and decoration
provider in the capability module itself. New base class methods
`on_close` and `on_change` that take a client_id have been provided, for
`didClose` and `didOpen`/`didChange` notifications respectively. New
base class method `on_win` that takes topline and botline has been
provided to add extmarks or perform other work when lines of a buffer
are being drawn.
The autocmd callback loops through each active capability instance for
the buffer and calls a corresponding method with the triggering
client_id if it is currently attached to the buffer that triggered the
autocmd. The decoration provider just calls on_win for all active
capabilities on the buffer.
This slightly tweaks folding range to make use of these new client-id
specific callbacks.
Problem
The current list of properties for inlay hint resolve support includes a
non-existent "location". This field should be "label.location" according
to the specification. Tooltips and commands for inlay hint "parts"
aren't advertised as being resolvable.
Solution
Remove "location" and add "label.location", "label.tooltip", and
"label.command".
Closes#40740
Problem:
- No UI for listing extmarks.
- `:marks` doesn't support cmdline-completion.
Solution:
- Add completion and extmarks support to `:marks`.
- Update `get_buf_local_marks` to include the ":" (prompt-buffer) mark.
Following features must be N/A to detect v8.Y.0000 as N/A
- VisVim
- Windows *.def files
- Gvim
- runtime/doc/version8.txt ("too old")
(https://github.com/neovim/neovim/pull/1116 deletes version7.txt)
PR https://github.com/neovim/neovim/pull/36585 enabled
"scripts/vim-patch.sh", "scripts/vimpatch.lua" to optimize out
(all?) macros from Vim's "src/version.h".
If it does have relevant updates, then the applicable files
(ie. src/version.c) will use them to make the patch applicable.
Goal - Detect N/A patches for Vim release vX.Y.0000.
Problem:
Vimscript ftplugins that inherit a base ftplugin often use explicit
`runtime! ftplugin/foo.vim` patterns. This skips corresponding Lua
ftplugins, unlike top-level ftplugin loading.
Solution:
Use the existing `{vim,lua}` patterns for bang runtime imports while
preserving each call's current lookup breadth.
Problem:
This functions are most likely never used in the wild.
- They are redundant with `nvim_get_context` + `nvim_load_context`.
- The "context" concept was never fully developed and hasn't gained
traction.
Solution:
Drop these vimscript aliases, they are just extra cruft.
Problem:
`FileType directory` fires *before* the `BufEnter` path where `dir.lua`
populates the buffer, in order to allow a 3P dir-browser plugin to handle the
event and (optionally) rename the buffer to e.g. `example:///tmp/foo/`.
But currently, `open_buffer()` continues after `filetypedetect BufRead` as if
the original directory buffer is *still* current and valid, which may fall
through to the built-in `nvim.dir` path after a 3P plugin ALREADY handled the
directory.
Solution:
Keep a buf ref around the early `filetypedetect BufRead` call for directory
buffers.
If the `FileType directory` handler switches away from/deletes the original
directory buffer, stop the open path instead of continuing into the built-in
`nvim.dir` flow.
Problem:
After 25439dad7e, `opts` is optional, but not params that follow it.
Solution:
- Update `gen_api_dispatch.lua`, docs, tests.
- Enhance the `nvim_get_api_info()` api-metadata to include a boolean
flag indicating whether a parameter is optional:
```
[type, name, optional]
```
Note: Currently, optional params are assumed to be Dict/Array. Since we
don't yet have any use-cases of optional params following `opts`, the
build just checks this assumption and we can deal with it later if we
ever care to:
nvim_get_hl: optional param "foo" has type "Integer" but (currently)
we assume Dict/Array
FAILED …/plugin/pack_spec.lua:92: …/plugin/pack_spec.lua @ 70: vim.pack update() can use lockfile revision as a target
…/plugin/pack_spec.lua:92: …/plugin/pack_spec.lua:70: process still exists
stack traceback:
D:/a/neovim/neovim/test/functional/testnvim/exec_lua.lua:124: in function 'system_sync'
…/plugin/pack_spec.lua:92: in function 'git_cmd'
…/plugin/pack_spec.lua:113: in function 'git_add_commit'
…/plugin/pack_spec.lua:1209: in function <…/plugin/pack_spec.lua:1173>
fix#40167