aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* 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.1072: 'diffopt' "linematch" cannot be used with {n} less than 10zeertzjq2025-02-04
| | | | | | | | | | Problem: 'diffopt' "linematch" cannot be used with {n} less than 10 digits (after v9.1.1022) Solution: Fix off-by-one error when checking for digit (zeertzjq) closes: vim/vim#16577 https://github.com/vim/vim/commit/ccd7f454fcac2f99085d4f50e79c111c02741166
* 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>
* vim-patch:9.1.1022: linematch option value not completedzeertzjq2025-02-04
| | | | | | | | | | | | | Problem: linematch option value not completed (after v9.1.1009) Solution: Update diffoption completion values related: vim/vim#9661 closes: vim/vim#16437 https://github.com/vim/vim/commit/9162e636b31dcac57876cbdec15a683cedd9760e Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.1009: diff feature can be improvedzeertzjq2025-02-04
| | | | | | | | | | | | Problem: diff feature can be improved Solution: include the linematch diff alignment algorithm (Jonathon) closes: vim/vim#9661 https://github.com/vim/vim/commit/7c7a4e6d1ad50d5b25b42aa2d5a33a8d04a4cc8a Co-authored-by: Jonathon <jonathonwhite@protonmail.com>
* vim-patch:9.1.1074: Strange error when heredoc marker starts with "trim" ↵zeertzjq2025-02-04
| | | | | | | | | | | | | | | | | (#32317) Problem: Strange error when heredoc marker starts with "trim". Solution: Check for whitespace after "trim" or "eval" (zeertzjq) For :python3 etc., a heredoc marker that starts with a lower-case letter is valid, and when it starts with "trim" it works in a script but not in a function, and this PR makes it works in a function. For :let, a heredoc marker that starts with a lower-case letter is not valid, but when it starts with "trim" or "eval" the error can be a bit confusing in a function, and this PR make it less confusing. closes: vim/vim#16574 https://github.com/vim/vim/commit/449c2e5454735fe1cfc8c21b2c6880d6bdf4cd6e
* vim-patch:9.1.1073: tests: test_compiler fails on Windows without Mavenzeertzjq2025-02-04
| | | | | | | | | | Problem: tests: test_compiler fails on Windows without Maven. Solution: Add Xspotbugs directory to $PATH when mvn is not available (zeertzjq). closes: vim/vim#16576 https://github.com/vim/vim/commit/23da16d3d023a20565dc29128208e6cb095231d9
* vim-patch:9.1.0967: SpotBugs compiler setup can be further improvedzeertzjq2025-02-04
| | | | | | | | | | | | Problem: SpotBugs compiler can be further improved Solution: Introduce event-driven primitives for SpotBugs (Aliaksei Budavei) closes: vim/vim#16258 https://github.com/vim/vim/commit/2e252474c4df5018b9819d86ebb70bf3b1b1a1af Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
* vim-patch:9.1.0935: SpotBugs compiler can be improvedzeertzjq2025-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: SpotBugs compiler can be improved Solution: runtime(compiler): Improve defaults and error handling for SpotBugs; update test_compiler.vim (Aliaksei Budavei) runtime(compiler): Improve defaults and error handling for SpotBugs * Keep "spotbugs#DefaultPreCompilerTestAction()" defined but do not assign its Funcref to the "PreCompilerTestAction" key of "g:spotbugs_properties": there are no default and there can only be introduced arbitrary "*sourceDirPath" entries; therefore, this assignment is confusing at best, given that the function's implementation delegates to whatever "PreCompilerAction" is. * Allow for the possibility of relative source pathnames passed as arguments to Vim for the Javac default actions, and the necessity to have them properly reconciled when the current working directory is changed. * Do not expect users to remember or know that new source files ‘must be’ ":argadd"'d to be then known to the Javac default actions; so collect the names of Java-file buffers and Java-file Vim arguments; and let users providing the "@sources" file-lists in the "g:javac_makeprg_params" variable update these file-lists themselves. * Strive to not leave behind a fire-once Syntax ":autocmd" for a Java buffer whenever an arbitrary pre-compile action errors out. * Only attempt to run a post-compiler action in the absence of failures for a pre-compiler action. Note that warnings and failures are treated alike (?!) by the Javac compiler, so when previews are tried out with "--enable-preview", remember about passing "-Xlint:-preview" too to also let SpotBugs have a go. * Properly group conditional operators when testing for key entries in a user-defined variable. * Also test whether "javaExternal" is defined when choosing an implementation for source-file parsing. * Two commands are provided to toggle actions for buffer-local autocommands: - SpotBugsRemoveBufferAutocmd; - SpotBugsDefineBufferAutocmd. For example, try this from "~/.vim/after/ftplugin/java.vim": ------------------------------------------------------------ if exists(':SpotBugsDefineBufferAutocmd') == 2 SpotBugsDefineBufferAutocmd BufWritePost SigUSR1 endif ------------------------------------------------------------ And ":doautocmd java_spotbugs User" can be manually used at will. closes: vim/vim#16140 https://github.com/vim/vim/commit/368ef5a48c7a41af7fe2c32a5d5659e23aff63d0 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.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.1071: args missing after failing to redefine a functionzeertzjq2025-02-03
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Arguments of a function are missing after failing to redefine it (after 8.2.2505), and heap-use-after-free with script-local function (after 9.1.1063). Solution: Don't clear arguments or free uf_name_exp when failing to redefine an existing function (zeertzjq) closes: vim/vim#16567 https://github.com/vim/vim/commit/04d2a3fdc051d6a419dc0ea4de7a9640cefccd31
* | vim-patch:9.1.1066: heap-use-after-free and stack-use-after-scope with ↵zeertzjq2025-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | :14verbose Problem: heap-use-after-free and stack-use-after-scope with :14verbose when using :return and :try (after 9.1.1063). Solution: Move back the vim_free(tofree) and the scope of numbuf[]. (zeertzjq) closes: vim/vim#16563 https://github.com/vim/vim/commit/2101230f4013860dbafcb0cab3f4e6bc92fb6f35
* | 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.1069: preinsert text completions not deleted with <C-W>/<C-U> ↵glepnir2025-02-02
| | | | | | | | | | | | | (#32296) Problem: preinsert text completions not deleted with <C-W>/<C-U> (ddad431, after v9.1.1059) Solution: handle <C-W> or <C-U> specifically and clear the completion (glepnir) fixes: vim/vim#16557 closes: vim/vim#16565 https://github.com/vim/vim/commit/001c26cd6194fba2bfccb06dec30fdc9e1410e62
* 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>
* vim-patch:9.1.1065: no digraph for "Approaches the limit" (#32289)zeertzjq2025-02-02
| | | | | | | | | | | | | | Problem: no digraph for "Approaches the limit" Solution: Add the digraph using .= (Hans Ginzel) Add digraph Approaches the Limit ≐ U+2250 https://www.fileformat.info/info/unicode/char/2250/index.htm closes: vim/vim#16508 https://github.com/vim/vim/commit/3a621188ee52badfe7aa783db12588a78dcd8ed6 Co-authored-by: Hans Ginzel <hans@matfyz.cz>
* fix(treesitter): nil access when running string parser asyncRiley Bruins2025-02-01
|
* vim-patch:9.1.1059: completion: input text deleted with preinsert when ↵zeertzjq2025-02-01
| | | | | | | | | | | | | adding leader (#32276) Problem: completion: input text deleted with preinsert when adding leader Solution: remove compl_length and check the ptr for being equal to pattern when preinsert is active (glepnir) closes: vim/vim#16545 https://github.com/vim/vim/commit/bfb4eea7869b0118221cd145a774d74191ce6130 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1057: Superfluous cleanup steps in test_ins_complete.vim (#32257)zeertzjq2025-01-30
| | | | | | | | | | Problem: Superfluous cleanup steps in test_ins_complete.vim. Solution: Remove unnecessary :bw! and :autocmd! commands. Also remove unnecessary STRLEN() in insexpand.c (zeertzjq) closes: vim/vim#16542 https://github.com/vim/vim/commit/8297e2cee337c626c6691e81b25e1f1897c71b86
* vim-patch:9.1.1056: Vim doesn't highlight to be inserted text when ↵zeertzjq2025-01-30
| | | | | | | | | | | | | | | | | completing (#32251) Problem: Vim doesn't highlight to be inserted text when completing Solution: Add support for the "preinsert" 'completeopt' value (glepnir) Support automatically inserting the currently selected candidate word that does not belong to the latter part of the leader. fixes: vim/vim#3433 closes: vim/vim#16403 https://github.com/vim/vim/commit/edd4ac3e895ce16034c7e098f1d68e0155d97886 Co-authored-by: glepnir <glephunter@gmail.com>
* Merge pull request #32243 from jamessan/snprintf-unit-testsJames McCoy2025-01-29
|\ | | | | Fix "vim_snprintf() positional arguments" failures on 32-bit systems
| * test(unit/strings_spec): use correct type for binary valuesJames McCoy2025-01-29
| | | | | | | | | | When 9.0.1856 was ported, the numbers being formatted as binary were cast to "unsigned int" rather than uvarnumber_T, as is done upstream.
| * test(unit/strings_spec): provide context for vim_snprintf testsJames McCoy2025-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since these assertions all use a common function to perform the test assertions, it's difficult to figure out which test failed: ERROR test/unit/testutil.lua @ 785: vim_snprintf() positional arguments test/unit/testutil.lua:757: test/unit/testutil.lua:741: (string) ' test/unit/strings_spec.lua:143: Expected objects to be the same. Passed in: (number) 6400 Expected: (number) 6' exit code: 256 Adding context to the assertion makes it clearer what the problem is: ERROR test/unit/testutil.lua @ 785: vim_snprintf() positional arguments test/unit/testutil.lua:757: test/unit/testutil.lua:741: (string) ' test/unit/strings_spec.lua:149: snprintf(buf, 0, "%1$0.*2$b", cdata<unsigned int>: 0xf78d0f38, cdata<int>: 0xf78dc4e0) = 001100 Expected objects to be the same. Passed in: (number) 6400 Expected: (number) 6' exit code: 256
* | 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.
* vim-patch:9.1.1052: tests: off-by-one error in CheckCWD in test_debugger.vim ↵zeertzjq2025-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | (#32202) Problem: tests: off-by-one error in CheckCWD in test_debugger.vim Solution: Fix off-by-one in CheckCWD leading to local tests failure (Yee Cheng Chin) Vim's test_debugger's Test_debug_backtrace_level test will fail if you happen to run it in a Vim repository with full path of directory being exactly 29 characters (e.g. `/Users/bob/developing/src/vim`). The test does term dump comparison and the printout will overflow if the CWD is too long. It does have a function to skip to test if it detects that but it's off by one leading to this one situation where it will fail. The reason why the logic didn't account for this is that Vim's message printing will overflow the text if it prints a message at exactly the width of the terminal. This could be considered a bug / quirk but that will be another issue. closes: vim/vim#16517 https://github.com/vim/vim/commit/3acfbb4b548f4b1659ff1368a1b626cdd263acbe Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:9.1.1053: "nosort" enables fuzzy filtering even if "fuzzy" isn't ↵zeertzjq2025-01-25
| | | | | | | | | | | | | in 'completeopt' Problem: "nosort" enables fuzzy filtering even if "fuzzy" isn't in 'completeopt' (after v9.1.1049) Solution: Only enable fuzzy filtering when "fuzzy" is in 'completeopt'. (zeertzjq) closes: vim/vim#16510 https://github.com/vim/vim/commit/d65aa1bbdb808ef8fecde6df240c48cc39a52a8e
* vim-patch:9.1.1049: insert-completed items are always sortedzeertzjq2025-01-25
| | | | | | | | | | | | | | | | | | | Problem: insert-completed items are always sorted, although the LSP spec[1] standard defines sortText in the returned completionitem list. This means that the server has sorted the results. When fuzzy is enabled, this will break the server's sorting results. Solution: disable sorting of candidates when "nosort" is set in 'completeopt' [1] https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem closes: vim/vim#16501 https://github.com/vim/vim/commit/f400a0cc41113eb75516bdd7f38aeaa15208ba2c Co-authored-by: glepnir <glephunter@gmail.com>
* 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
|
* fix(mouse): 'statuscolumn' fold and popopmenu handlingLuuk van Baal2025-01-23
| | | | | | | | | Problem: A right-click on the 'statuscolumn' does not open the popupmenu, even if a cell without a clickdef is clicked. Clicking the %C fold item does not open/close the fold. Solution: Open the popupmenu when there is no clickdef like right-clicking the sign/numbercolumn does. Fill "linebuf_vcol" when drawing the 'statuscolumn' to handle foldcolumn item clicks.
* feat(api): combined highlights in nvim_eval_statusline()Luuk van Baal2025-01-23
| | | | | | | | | | | Problem: Combined highlighting was not applied to nvim_eval_statusline(), and 'statuscolumn' sign segment/numhl highlights. Solution: Add an additional `groups` element to the return value of `nvim_eval_statusline()->highlights`. This is an array of stacked highlight groups (highest priority last). Also resolve combined highlights for the 'statuscolumn' sign segment/numhl highlights. Expose/synchronize some drawline.c logic that is now mimicked in three different places.
* vim-patch:9.1.1042: filetype: just files are not recognizedChristian Clason2025-01-23
| | | | | | | | | | | | | Problem: filetype: just files are not recognized Solution: adjust filetype detection pattern, detect just shebang line, include just ftplugin, indent and syntax plugin (Peter Benjamin) closes: vim/vim#16466 https://github.com/vim/vim/commit/72755b3c8e91ec90447969b736f080e0de36003d Co-authored-by: Peter Benjamin <petermbenjamin@gmail.com>
* vim-patch:9.1.1045: filetype: N-Tripels and TriG files are not recognized ↵zeertzjq2025-01-23
| | | | | | | | | | | | | (#32170) Problem: filetype: N-Tripels and TriG files are not recognized Solution: detect '*.nt' files as ntriples filetype and '*.trig' files as trig filetype (Gordian Dziwis) closes: vim/vim#16493 https://github.com/vim/vim/commit/c04334c33f543a6b84a4442cf235d84f5eaef6bb Co-authored-by: Gordian Dziwis <gordian@dziw.is>
* vim-patch:9.1.1048: crash after scrolling and pasting in silent Ex mode (#32168)zeertzjq2025-01-23
| | | | | | | | | | Problem: Crash after scrolling and pasting in silent Ex mode. (fizz-is-on-the-way) Solution: Don't move cursor to line 0 when scrolling. (zeertzjq) closes: vim/vim#16506 https://github.com/vim/vim/commit/df098fedbc2c481e91ea7e6207dab90359a92cc3