aboutsummaryrefslogtreecommitdiff
path: root/test/functional
Commit message (Collapse)AuthorAge
* feat(lsp): add support for completionItem.command resolvingMathias Fussenegger2025-02-14
| | | | | | | | `command` was already resolved via a `completionItem/resolve` request but only if `additionalTextEdits` were also present, and the `resolveSupport` capability wasn't listed. Closes https://github.com/neovim/neovim/issues/32406
* fix(float): "Not enough room" error for 1-line float #25192glepnir2025-02-14
| | | | | | | | | Problem: set winbar on a floating window which only have one row will cause crash. Solution: when new floating window only have one room don't copy winbar from target window" Fix #19464
* feat(term): trigger TermRequest for APC (#32407)Till Bungert2025-02-13
| | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(lsp): clear word when expand multi-lines word (#32393)glepnir2025-02-13
| | | | | Problem: When expanding a completion item that contains a multi-line word, the word is not deleted correctly. Solution: If the word contains a line break, delete the text from Context.cursor to the current cursor position.
* fix(lsp): autotrigger should only trigger on client's triggerCharacters (#32266)Robert Muir2025-02-13
| | | | | | | | | | | | Problem: autotrigger option of vim.lsp.completion.enable() would trigger all clients, as long as it matched at least one client's triggerCharacters. Solution: trigger only the clients with triggerCharacters matching the character. overtriggering still happens if any client returns isIncomplete=true (this case is more involved). Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
* fix(memline): don't check line count for closed memline #32403luukvbaal2025-02-12
| | | | | | Problem: Error thrown when for invalid line number which may be accessed in an `on_detach` callback at which point line count is intentionally set to 0. Solution: Move empty memline check to before line number check.
* feat(column): apply appropriate numhl highlight to virt_lines (#32400)luukvbaal2025-02-12
| | | | | | | Problem: Number and statuscolumn highlighting for virtual lines does not take always take on numhl highlights. Solution: Apply the appropriate numhl highlight to the number/statuscolumn of virtual lines, fetching the numhl highlight of the line above for `virt_line_above == false` lines.
* feat(options): add 'eventignorewin' (#32152)luukvbaal2025-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:partial:9.1.1084: Unable to persistently ignore events in a window and its buffers Problem: Unable to persistently ignore events in a window and its buffers. Solution: Add 'eventignorewin' option to ignore events in a window and buffer (Luuk van Baal) Add the window-local 'eventignorewin' option that is analogous to 'eventignore', but applies to a certain window and its buffers. Identify events that should be allowed in 'eventignorewin', adapt "auto_event" and "event_tab" to encode this information. Window context is not passed onto apply_autocmds_group(), and when to ignore an event is a bit ambiguous when "buf" is not "curbuf", rather than a large refactor, only ignore an event when all windows into "buf" are ignoring the event. https://github.com/vim/vim/commit/b7147f8236c962cd74d1ce028d9106f1c449ea6c vim-patch:9.1.1102: tests: Test_WinScrolled_Resized_eiw() uses wrong filename Problem: tests: Test_WinScrolled_Resized_eiw() uses wrong filename (Luuk van Baal, after v9.1.1084) Solution: Rename the filename to something more unique https://github.com/vim/vim/commit/bfc7719e48ffc365ee0a1bd1888120d26b6365f0
* refactor(tests): drop os_kill #32401Justin M. Keyes2025-02-11
| | | Also change job tests to use `nvim` instead of random programs like `ping`.
* Merge #30860 LSP: symbols_to_items()Justin M. Keyes2025-02-11
|\
| * feat(lsp)!: `symbol_to_item` requires `offset_encoding`Yi Ming2025-02-11
| |
* | fix(treesitter): detect trees with outdated regions in `is_valid()`Riley Bruins2025-02-11
|/
* fix(ui): Windows :detach is opt-inJustin M. Keyes2025-02-10
| | | | | | | | | Problem: On Windows, spawning the `nvim --embed` server with `detach=true` breaks various `tt.setup_child_nvim` tests. Solution: Make this behavior opt-in with an env var, temporarily.
* test: use --cleanJustin M. Keyes2025-02-10
|
* feat(ui): UI :detach commandJustin M. Keyes2025-02-10
| | | | | | | | | | | Problem: Cannot detach the current UI. Solution: - Introduce `:detach`. - Introduce `Channel.detach`. Co-authored-by: bfredl <bjorn.linse@gmail.com>
* fix(api): memory leaks in vim.api.nvim_*get_option #32390Cai Rijun (Richard)2025-02-10
| | | | | | Problem: `get_option_value` returns caller owned `Object`s but the corresponding C apis do not marked `FUNC_API_RET_ALLOC` properly. Solution: add `FUNC_API_RET_ALLOC` to the C apis.
* test(fix): make testing of ext_cmdline optional #32375fredizzimo2025-02-10
|
* vim-patch:f30eb4a: runtime(qf): Update syntax file, match second delimiterChristian Clason2025-02-10
| | | | | | | | | | | Match both | separators and link to the Delimiter highlight group. fixes vim/vim#16584 closes: vim/vim#16590 https://github.com/vim/vim/commit/f30eb4a17084eea741a9eb09ba47dd501412283d Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* fix(defaults): improve visual search mappings #32378neeshy2025-02-09
| | | | | | | | | | | | | | | | | | Problem: The behavior of the visual search mappings aren't consistent with their normal mode counterparts. - The count isn't considered - Searching with an empty selection will match every character in the buffer - Searching backwards only jumps back when the cursor is positioned at the start of the selection. Solution: - Issue `n` `v:count1` times - Error out and exit visual mode when the selection is empty - Detect when the cursor is not at the start of the selection, and adjust the count accordingly Also, use the search register instead of the more error-prone approach of feeding the entire search string as an expression
* fix(lua): vim.tbl_get({}, nil, 1) should return nil #32218phanium2025-02-09
| | | | | | | | | | | | | | | Problem: `vim.tbl_get(tbl, nil, 1)` returns `tbl` itself. In this case, `keys` is not empty, but `ipairs` skips the iteration: local keys = { nil, 1 } assert(#keys == 2) for i, k in ipairs(keys) do assert(false, 'unreachable') end Solution: Use `select("#", ...)` and `select(i, ...)` to ensure consistency for count and iteration.
* test: reset cmdline abort state only after expect() has finished #32376fredizzimo2025-02-09
| | | | | | | Problem: cmdline abort state may be reset when intermediate states are received. Solution: Reset after `self:_wait()`.
* test: screen.lua can check win_pos #32373fredizzimo2025-02-09
| | | Also remove a hack in the multigrid "with winbar" test.
* vim-patch:9.1.1086: completion doesn't work with multi lines (#32377)glepnir2025-02-09
| | | | | | | | | | | Problem: completion doesn't work with multi lines (Łukasz Jan Niemier) Solution: handle linebreaks in completion code as expected (glepnir) fixes: vim/vim#2505 closes: vim/vim#15373 https://github.com/vim/vim/commit/76bdb82527a13b5b2baa8f7d7ce14b4d5dc05b82
* fix(messages): improve deadly signal messages #32364Justin M. Keyes2025-02-07
| | | | | | | | Problem: Deadly signal messages mention "Vim", and add redundant newlines. Solution: - Update the messages. - Don't add an extra newline.
* feat(defaults): enable diffopt "linematch" #32346Siddhant Agarwal2025-02-06
|
* feat(diagnostic): add `current_line` option for `virtual_text` handlerMaria José Solano2025-02-05
|
* feat(treesitter): show which nodes are missing in InspectTreeRiley Bruins2025-02-05
| | | | | | | | Now `:InspectTree` will show missing nodes as e.g. `(MISSING identifier)` or `(MISSING ";")` rather than just `(identifier)` or `";"`. This is doable because the `MISSING` keyword is now valid query syntax. Co-authored-by: Christian Clason <c.clason@uni-graz.at>
* fix(messages): add a trailing space to inputlist() etc. prompts (#32328)zeertzjq2025-02-05
| | | | Before #31525 the prompts had a trailing space. Also add a test for #7857.
* fix(event-loop): process input before events in getchar() (#32322)zeertzjq2025-02-05
| | | Follow-up to #27358.
* test(terminal/cursor_spec): remove unnecessary busy handlers (#32321)zeertzjq2025-02-04
| | | | They are no longer necessary after #31562, as busy_start and busy_stop are no longer emitted by terminal buffers with visible cursor.
* test(getchar_spec): fix flakiness (#32320)zeertzjq2025-02-04
| | | | | Problem: getchar_spec may fail when screen:expect_unchanged() doesn't wait long enough. Solution: Add poke_eventloop() before screen:expect_unchanged().
* vim-patch:9.1.1027: no sanitize check when running linematchzeertzjq2025-02-04
| | | | | | | | | | | | Problem: no sanitize check when running linematch Solution: add sanitize check before applying the linematch algorithm, similar to diff_find_change() (Jonathon) closes: vim/vim#16446 https://github.com/vim/vim/commit/ca307efe486670b76563a4a287bc94dace57fb74 Co-authored-by: Jonathon <jonathonwhite@protonmail.com>
* Merge #32082 refactor(treesitter): use coroutines for resuming _parse()Justin M. Keyes2025-02-03
|\
| * feat(treesitter): allow LanguageTree:is_valid() to accept a rangeRiley Bruins2025-02-02
| | | | | | | | | | | | When given, only that range will be checked for validity rather than the entire tree. This is used in the highlighter to save CPU cycles since we only need to parse a certain region at a time anyway.
* | feat(diagnostic): format() can filter diagnostics by returning nil #32302Maria José Solano2025-02-03
| |
* | vim-patch:9.1.1070: Cannot control cursor positioning of getchar() (#32303)zeertzjq2025-02-03
| | | | | | | | | | | | | | | | | | | | Problem: Cannot control cursor positioning of getchar(). Solution: Add "cursor" flag to {opts}, with possible values "hide", "keep" and "msg". related: vim/vim#10603 closes: vim/vim#16569 https://github.com/vim/vim/commit/edf0f7db28f87611368e158210e58ed30f673098
* | fix(statusline): overwriting stl_items with nvim_eval_statusline() {-item #32265luukvbaal2025-02-02
|/ | | | | | | | | | Problem: When an evaluation {-item calls `nvim_eval_statusline()`, that nested call may overwrite the same memory used for `stl_items`. Solution: Make `curitem` static and use it to compute an offset to avoid overwriting `stl_items` in nested calls to `build_stl_str_hl()`. Move miscellaneous statusline tests into `describe()` block.
* vim-patch:9.1.1068: getchar() can't distinguish between C-I and Tab (#32295)zeertzjq2025-02-02
| | | | | | | | | | | | Problem: getchar() can't distinguish between C-I and Tab. Solution: Add {opts} to pass extra flags to getchar() and getcharstr(), with "number" and "simplify" keys. related: vim/vim#10603 closes: vim/vim#16554 https://github.com/vim/vim/commit/e0a2ab397fd13a71efec85b017d5d4d62baf7f63 Cherry-pick tv_dict_has_key() from patch 8.2.4683.
* fix(autocmds): once=true Lua event-handler may call itself #29544Felipe Vicentin2025-02-01
| | | | | | | | | | | | | | | | | | Problem: Event handler declared with `once=true` can re-trigger itself (i.e. more than once!) by calling `nvim_exec_autocmds` or `:doautocmd`. Analysis: This happens because the callback is executed before deletion/cleanup (`aucmd_del`). And calling `aucmd_del` before `call_autocmd_callback` breaks the autocmd execution... Solution: Set `ac->pat=NULL` to temporarily "delete" the autocmd, then restore it after executing the callback. Fix #25526 Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* fix(treesitter): nil access when running string parser asyncRiley Bruins2025-02-01
|
* fix(ui): avoid redundant ext_cmdline events (#32237)luukvbaal2025-01-29
| | | | | | | | Problem: `cmdline_show` is emitted unnecessarily each event loop iteration, because `cmdline_was_last_drawn` is never set. Solution: Keep track of whether the cmdline was last drawn to avoid unnecessarily emitting cmdline_show. Set `redraw_state` to emit `cmdline_pos` when emitting `CursorMovedC`. Only emit `cmdline_pos` when cmdline was last drawn.
* feat(treesitter): support modelines in `query.set()` (#30257)Maria José Solano2025-01-29
|
* fix(float): cannot set title/footer independently #31993glepnir2025-01-27
| | | | | | | | Problem: `nvim_win_set_config` cannot set the title and footer independently. When only one is given, the other is reset to the default of "left". Solution: Reuse existing title/footer value if not provided.
* build(deps)!: bump tree-sitter to HEAD, wasmtime to v29.0.1 (#32200)Christian Clason2025-01-27
| | | | | Breaking change: `ts_node_child_containing_descendant()` was removed Breaking change: tree-sitter 0.25 (HEAD) required
* feat(diagnostic): virtual_lines #31959Maria José Solano2025-01-26
|
* feat(api): nvim_get_autocmds filter by id#31549glepnir2025-01-26
| | | | | | | Problem: nvim_get_autocmds cannot filter by id. Solution: Support it.
* feat(extmarks): virtual text can be right-aligned, truncated #31921georgev932025-01-24
| | | | | | | | | Problem: Right aligned virtual text can cover up buffer text if virtual text is too long Solution: An additional option for `virt_text_pos` called `eol_right_align` has been added to truncate virtual text if it would have otherwise covered up buffer text. This ensures the virtual text extends no further left than EOL.
* fix(lua): pop retval for fast context LuaRefLuuk van Baal2025-01-24
| | | | | | Problem: nlua_call_ref_ctx() does not pop the return value in fast context that did not error. Solution: Fall through to end; calling nlua_call_pop_retval().
* fix(messages): avoid empty msg_showmode with 'noshowmode'Luuk van Baal2025-01-24
|
* fix(column): apply custom highlight to last 'statuscolumn' segment (#32182)luukvbaal2025-01-24
|