aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* fix(float): ensure floating window width can fit titleMaria José Solano2025-02-23
|
* vim-patch:9.1.1139: [fifo] is not displayed when editing a fifozeertzjq2025-02-23
| | | | | | | | | | | | | Problem: [fifo] is not displayed when editing a fifo (after v7.4.2189) Solution: stat the filename and detect the type correctly fixes: vim/vim#16702 closes: vim/vim#16705 https://github.com/vim/vim/commit/f1c3134ee1f263e537212a3072e8aa4cb7e8d953 Co-authored-by: Christian Brabandt <cb@256bit.org>
* test(unit/strings_spec): show ctx when vim_snprintf content check fails #32570James McCoy2025-02-22
| | | | | | | | | | | | | | Same idea as a7be4b7bf857, but that only showed the context if the length of the string differed. Since these tests check both string length and string content, the ctx should be provided for both. ERROR test/unit/testutil.lua @ 797: vim_snprintf() positional arguments test/unit/testutil.lua:769: test/unit/testutil.lua:753: (string) ' test/unit/strings_spec.lua:159: snprintf(buf, 4, "%1$0.*2$b", 12ULL, cdata<int>: 0xf78c8ed8) = 001100 Expected objects to be the same. Passed in: (string) '000' Expected: (string) '001''
* vim-patch:9.1.1134: filetype: Guile init file not recognizedChristian Clason2025-02-23
| | | | | | | | | | | | | | | | | | | Problem: filetype: Guile init file not recognized Solution: detect '.guile' file as scheme filetype (David Mandelberg) References: https://www.gnu.org/software/guile/manual/html_node/Init-File.html > When run interactively, Guile will load a local initialization file > from ~/.guile. This file should contain Scheme expressions for > evaluation. closes: vim/vim#16683 https://github.com/vim/vim/commit/41a6026f007facb1ada3ff2a63a054913432860c Co-authored-by: David Mandelberg <david@mandelberg.org>
* vim-patch:9.1.1133: filetype: xkb files not recognized everywhereChristian Clason2025-02-23
| | | | | | | | | | | | | | | Problem: filetype: xkb files not recognized everywhere Solution: detect xkb files in more places (David Mandelberg) References: https://xkbcommon.org/doc/current/user-configuration.html#user-config-locations closes: vim/vim#16684 https://github.com/vim/vim/commit/b62bf814886185cb8607ce15051aa7017b8c88ba Co-authored-by: David Mandelberg <david@mandelberg.org>
* vim-patch:9.1.1135: 'suffixesadd' doesn't work with multiple items (#32573)zeertzjq2025-02-22
| | | | | | | | | | | Problem: 'suffixesadd' doesn't work with multiple items (after 9.1.1122). Solution: Don't concat multiple suffixes together. (zeertzjq) fixes: vim/vim#16694 closes: vim/vim#16699 https://github.com/vim/vim/commit/bf595ae4ac9ecc1e0620664177072926ed3679ff
* fix(lsp): unify get_completion_word for textEdits/insertTextMathias Fussenegger2025-02-22
| | | | | | | | | | | | | | Problem: After https://github.com/neovim/neovim/pull/32377 selecting snippets provided by luals inserted the multi-line text before accepting the candidates. That's inconsistent with servers who provide `textEdit` instead of `insertText` and having lines shift up/down while cycling through the completion candidates is a bit irritating. Solution: Use the logic used for `textEdit` snippets also for `insertText`
* fix(tests): filter out lines with __typeof__ keyword (#32524)Sören Tempel2025-02-22
| | | | | | | | Problem: On 32-bit architectures, musl libc makes heavy use of __typeof__ as part of its __REDIR macro for optional backwards compatibility with 32-bit time_t values. Unfortunately, the __typeof__ keyword is not supported by the LuaJIT C parser. Solution: Filter out the keyword in filter_complex_blocks.
* vim-patch:9.1.1132: Mark positions wrong after triggering multiline ↵zeertzjq2025-02-21
| | | | | | | | | | | | | completion (#32564) Problem: Mark positions wrong after triggering multiline completion. Solution: Call deleted_lines_mark() after deleting lines. (zeertzjq) closes: vim/vim#16687 https://github.com/vim/vim/commit/060e6556e2cd97512cee1f46bc7915768c0f9e21 Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
* fix(marks): truncate double-width inline virt_text consistently (#32560)zeertzjq2025-02-21
| | | | - Fix wrong cursor position with 'listchars' "precedes". - Always show the '<' truncation character.
* vim-patch:9.1.1130: 'listchars' "precedes" is not drawn on Tabs. (#32563)zeertzjq2025-02-21
| | | | | | | | | | Problem: 'listchars' "precedes" is not drawn on Tabs. Solution: Only draw 'listchars' "precedes" when not skipping over cells. (zeertzjq) fixes: vim/vim#5927 closes: vim/vim#16691 https://github.com/vim/vim/commit/13f100e9328b1344fec79806791eb3f5234d4ccc
* test: adjust multibyte virtual text test (#32557)zeertzjq2025-02-21
| | | | Having more chars after a double-width char makes it easier to spot the bug where truncating it causes the pending chars to be lost.
* fix(treesitter): `TSNode:field()` returns all children with the given fieldRiley Bruins2025-02-21
|
* perf(treesitter): only search for injections within the parse rangeRiley Bruins2025-02-21
| | | | Co-authored-by: Jaehwang Jung <tomtomjhj@gmail.com>
* fix(messages): list_cmd kind for :registers, :au[g] #32531luukvbaal2025-02-20
| | | | | | | | Problem: No kind for `:registers/autocmd/augroup` messages. `:registers` chunks are emitted as separate `msg_show` events. Solution: Add the `list_cmd` kind to the message. Introduce a new `msg_ext_skip_flush` variable to set to true around a group of to be paired message chunks.
* vim-patch:9.1.1127: preinsert text is not cleaned up correctly (#32544)zeertzjq2025-02-21
| | | | | | | | | | | | Problem: when 'completeopt' is set to preinsert the preinserted text is not cleared when adding new leader (Yee Cheng Chin) Solution: add a condition to delete preinsert text in edit function (glepnir) closes: vim/vim#16672 https://github.com/vim/vim/commit/52fd867f5e8a371653ee4fb6664593c82030f855 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1125: cannot loop through pum menu with multiline items (#32543)zeertzjq2025-02-21
| | | | | | | | | | | | Problem: cannot loop through pum menu with multiline items with fuzzy and noselect in 'completeopt' (Tomasz N) Solution: remove unnecessary compl_no_select condition (glepnir) fixes: vim/vim#16641 closes: vim/vim#16674 https://github.com/vim/vim/commit/3af0a8d8f5b090a6a4b085e7b6ee0f5f87eda399 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1126: patch 9.1.1121 used a wrong way to handle enterzeertzjq2025-02-21
| | | | | | | | | | | | Problem: patch 9.1.1121 used a wrong way to handle enter Solution: compl_enter_selects also needs to consider the selected item in ins_compl_new_leader() (glepnir) closes: vim/vim#16673 https://github.com/vim/vim/commit/44180416981000ad0bc5db4686889892e7a05cdd Co-authored-by: glepnir <glephunter@gmail.com>
* test(completion_spec): make Enter test descriptions more accuratezeertzjq2025-02-21
|
* vim-patch:9.1.1121: Enter does not insert newline with "noselect"glepnir2025-02-21
| | | | | | | | | | | | | | | Problem: Enter does not insert newline with "noselect" when the pum is visible (lifepillar) Solution: When Enter is pressed and no complete-item is selected, ins_compl_prep returns false, and the edit function continues processing Enter to insert a new line. (glepnir) fixes: vim/vim#1653 closes: vim/vim#16653 https://github.com/vim/vim/commit/07f0dbe3aa326fdf4d0f1b1cf7d79df89e91fc6e Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1124: No test for 'listchars' "precedes" with double-width ↵zeertzjq2025-02-21
| | | | | | | | | | | | | | char (#32541) Problem: No test for 'listchars' "precedes" with double-width char. Solution: Add a test and fix a typo in code (zeertzjq). closes: vim/vim#16675 https://github.com/vim/vim/commit/08a83a033a32c0f5bc42eaa63162c21c369cb4ae Cherry-pick test_listchars.vim changes from patch 9.0.0625. Fix a regression from #30014 by moving the mb_schar assignment after the double-width check.
* feat(messages): confirm kind for z=, :tselect, inputlist() #32521luukvbaal2025-02-20
| | | | | | | | | | | Problem: Messages preceding a `cmdline_show->prompt` event can not be distinguished as such when receiving the event. (But since `msg_show` handlers should be scheduled, one can already check whether a prompt is active when displaying the message.) Solution: Rather than add a new kind again, use the `confirm` kind. Could be seen as slightly misleading where it is more of a choice rather than a confirmation, but that already applies to `confirm()` as well...
* feat(marks): virtual lines support horizontal scrolling (#32497)zeertzjq2025-02-20
| | | | Add a new field `virt_lines_overflow` that enables horizontal scrolling for virtual lines when set to "scroll".
* fix(keycodes): recognize <Find>, <Select> #28431Mantas Mikulėnas2025-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PuTTY sets TERM=xterm, but sends ESC[1~ and ESC[4~ for Home/End keys, which does not match what the 'xterm' terminfo has for khome/kend, so libtermkeys instead reports them as the original DEC VT220 names. The VT220 came with a DEC LK201 keyboard which had the following keys in the area above arrow keys (where PCs now have Ins/Del/Home/End/etc): ┌────────┬────────┬────────┐ │ Find │ Insert │ Re- │ │ │ Here │ move │ ├────────┼────────┼────────┤ │ Select │ Prev │ Next │ │ │ Screen │ Screen │ └────────┴────────┴────────┘ These would send ESC[x~ sequences in the expected order: ┌────────┬────────┬────────┐ │ ESC[1~ │ ESC[2~ │ ESC[3~ │ ├────────┼────────┼────────┤ │ ESC[4~ │ ESC[5~ │ ESC[6~ │ └────────┴────────┴────────┘ Modern terminals continue to use the same sequences for Ins/Del as well as PageUp/PageDn. But the VT220 keyboard apparently had no Home/End, and PuTTY apparently chose to re-purpose the Find/Select key sequences for Home/End (even though it claims to emulate Xterm and this doesn't match what actual Xterm does). So when Home/End are used in Neovim through PuTTY with TERM=xterm (the default setting), libtermkey finds no match for the received sequences in the terminfo database and defaults to reporting them as <Find> and <Select> respectively. PuTTY is not unique here -- tmux *also* sends ESC[1~ and ESC[4~ after its internal translation -- but the difference is that 'tmux' terminfo correctly maps them to Home/End so Neovim recognizes them as such, while PuTTY defaults to using 'xterm' which uses a different mapping. This initial patch only allows Neovim to recognize <Find> and <Select> key codes as themselves, so that the user could manually map them e.g. using ":imap <Find> <Home>". Alternatives: - Using TERM=putty(-256color) would of course be the most correct solution, but in practice it leads to other minor issues, e.g. the need to have different PuTTY config profiles for older or non-Linux systems that lack that terminfo, or tmux's insistence on rendering italics as reverse. - Using Neovim through tmux avoids the problem (as tmux recognizes ESC[1~ on input), but is something that needs to be manually run every time. The keycodes.h constants are slightly misnamed because K_SELECT was already taken for a different purpose.
* fix(treesitter): avoid computing fold levels for empty bufferLuuk van Baal2025-02-19
| | | | | | | | Problem: Computing fold levels for an empty buffer (somehow) breaks the parser state, resulting in a broken highlighter and foldexpr. Cached foldexpr parser is invalid after filetype has changed. Solution: Avoid computing fold levels for empty buffer. Clear cached foldinfos upon `FileType`.
* fix(terminal): avoid more `busy_start` lacking `busy_stop` (#32509)Sean Dewar2025-02-19
| | | | | | | | | | | Problem: after #32458, it may still be possible for `busy_start` UI events to be emitted without matching `busy_stop`s in the terminal. Solution: do `terminal_enter`'s cursor visibility check immediately after setting/restoring State so it occurs before events. This ensures that if pending escape sequences are processed while in `terminal_enter`, the cursor's initial visibility is set before `is_focused` is checked by `term_settermprop`. As a result, we can move the call to `showmode` back to where it was originally.
* vim-patch:9.0.0532: edit test is flaky when run under valgrind (#32518)zeertzjq2025-02-19
| | | | | | | | | | Problem: Edit test is flaky when run under valgrind. Solution: Send some text to the terminal to trigger a redraw. https://github.com/vim/vim/commit/14f91765c07e147e0c8554a50560ae24dbd5ecea Cherry-pick Test_edit_shift_bs() from patch 8.2.4876. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test(lua/hl_spec): fix hang on exit with ASAN (#32508)zeertzjq2025-02-18
|
* fix(tests): remove the __extension__ keyword in filter_complex_blocks (#32483)Sören Tempel2025-02-18
| | | | | | | | | | | | | | | | | | Problem: This keyword is used by GCC and Clang to prevent -Wpedantic (and other options) from emitting warnings for many GNU C extensions. This is used heavily in Alpine Linux through musl libc and foritfy-headers. Without filtering the __extension__ keyword some type definitions are duplicated. For example, timeval is defined once as struct timeval { time_t tv_sec; suseconds_t tv_usec; }; and once as: __extension__ struct timeval { time_t tv_sec; suseconds_t tv_usec; }; Without this patch, the LuaJIT C parser doesn't recognize that these definitions are equivalent, causing unit test to fail on Alpine Linux. Solution: Filter out the keyword in filter_complex_blocks.
* docs: misc (#32258)dundargoc2025-02-17
| | | | | Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Julian Visser <12615757+justmejulian@users.noreply.github.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* test(lua/hl_spec): reduce flakiness (#32489)zeertzjq2025-02-17
|
* test: reduce flakiness in highlight tests (#32488)zeertzjq2025-02-17
|
* fix(marks): handle composing in inline virt_text with 'nowrap' (#32477)zeertzjq2025-02-16
|
* fix(marks): handle double-with inline virt_text with 'nowrap' (#32476)zeertzjq2025-02-16
|
* fix(terminal): avoid mismatched `busy_start` without `busy_stop` (#32458)Sean Dewar2025-02-15
| | | | | | | | | | | | | | | | Problem: `showmode` in `terminal_enter` may cause `vpeekc` to process events, which may handle pending escape sequences. If `CSI ? 25 l` is handled to hide the cursor, it may remain hidden even after leaving terminal mode if both `terminal_enter` and (indirectly) `showmode` call `ui_busy_start`, as there is only one matching call to `ui_busy_stop` after leaving terminal mode. Solution: let `terminal_enter` handle setting the initial visibility of the cursor before calling `showmode`. Closes #32456. This simple solution assumes it isn't possible for e.g. `os_breakcheck` to be called indirectly by something else before `terminal_enter` initially handles cursor visibility and after it restores it, which I think is true.
* 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
* vim-patch:9.1.1107: cannot loop through completion menu with fuzzy (#32438)zeertzjq2025-02-14
| | | | | | | | | | | | | | | Problem: cannot loop through completion menu with fuzzy and nosort in 'completeopt' (Tomasz N) Solution: Reset cur to zero and update compl_shown_match when 'completeopt' contains "nosort" but not "noselect" (glepnir) fixes: vim/vim#16624 closes: vim/vim#16629 https://github.com/vim/vim/commit/c0b7ca406ba18640c56e2746d6f6d03549d53072 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1108: 'smoothscroll' gets stuck with 'listchars' "eol" (#32434)zeertzjq2025-02-13
| | | | | | | | | | Problem: 'smoothscroll' gets stuck with 'listchars' "eol". Solution: Count size of 'listchars' "eol" in line size when scrolling. (zeertzjq) related: neovim/neovim#32405 closes: vim/vim#16627 https://github.com/vim/vim/commit/2c47ab8fcd7188fa87053c757ea86b0d846c06c1
* 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
* vim-patch:9.1.1104: CI: using Ubuntu 22.04 Github runners (#32409)zeertzjq2025-02-12
| | | | | | | | | | | Problem: CI: uses Ubuntu 22.04 runners Solution: Switch to Ubuntu 24.04 runners, make a few adjustments for different $TMPDIR (Drew Vogel) closes: vim/vim#16442 https://github.com/vim/vim/commit/f0ed0e6f6304d2eb6f43866126912c139778257d Co-authored-by: Drew Vogel <dvogel@github>
* 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
|/