aboutsummaryrefslogtreecommitdiff
path: root/test/functional
Commit message (Collapse)AuthorAge
* vim-patch:9.1.0647: [security] use-after-free in tagstack_clear_entryzeertzjq2024-08-02
| | | | | | | | | | | | | | | | | | | Problem: [security] use-after-free in tagstack_clear_entry (Suyue Guo ) Solution: Instead of manually calling vim_free() on each of the tagstack entries, let's use tagstack_clear_entry(), which will also free the stack, but using the VIM_CLEAR macro, which prevents a use-after-free by setting those pointers to NULL This addresses CVE-2024-41957 Github advisory: https://github.com/vim/vim/security/advisories/GHSA-f9cr-gv85-hcr4 https://github.com/vim/vim/commit/8a0bbe7b8aad6f8da28dee218c01bc8a0185a2d5 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(lsp): don't send foreign diagnostics to servers in buf.code_action (#29501)Mathias Fußenegger2024-08-01
| | | | | | | `buf.code_action` always included diagnostics on a given line from all clients. Servers should only receive diagnostics they published, and in the exact same format they sent it. Should fix https://github.com/neovim/neovim/issues/29500
* fix(lsp): prevent desync due to empty buffer (#29904)Jaehwang Jung2024-07-31
| | | | | | | | | | | | | | | Problem: Some language servers (e.g., rust-analyzer, texlab) are desynced when the user deletes the entire contents of the buffer. This is due to the discrepancy between how nvim computes diff and how nvim treats empty buffer. * diff: If the buffer became empty, then the diff includes the last line's eol. * empty buffer: Even if the buffer is empty, nvim regards it as having a single empty line with eol. Solution: Add special case for diff computation when the buffer becomes empty so that it does not include the eol of the last line.
* feat(lsp): lsp.completion support set deprecated (#29882)glepnir2024-07-31
| | | | | | Problem: CompletionItem in lsp spec mentioned the deprecated attribute Solution: when item has deprecated attribute set hl_group to DiagnosticDeprecated in complete function
* fix(scrollbind): properly take filler/virtual lines into accountLewis Russell2024-07-31
| | | | | | | | | | | | | | | | | | Problem: `'scrollbind'` does not work properly if the window being scrolled automatically contains any filler/virtual lines (except for diff filler lines). This is because when the scrollbind check is done, the logic only considers changes to topline which are represented as line numbers. Solution: Write the logic for determine the scroll amount to take into account filler/virtual lines. Fixes #29751
* vim-patch:9.1.0415: Some functions are not testedzeertzjq2024-07-31
| | | | | | | | | | | | Problem: Some functions are not tested Solution: Add a few more tests, fix a few minor problems (Yegappan Lakshmanan) closes: vim/vim#14789 https://github.com/vim/vim/commit/fe424d13ef6e5486923f23f15bb6951e3079412e Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* feat(treesitter): allow get_node to return anonymous nodesRiley Bruins2024-07-29
| | | | | Adds a new field `include_anonymous` to the `get_node` options to allow anonymous nodes to be returned.
* feat(treesitter): add node_for_range functionRiley Bruins2024-07-29
| | | | | | This is identical to `named_node_for_range` except that it includes anonymous nodes. This maintains consistency in the API because we already have `descendant_for_range` and `named_descendant_for_range`.
* fix(lsp): revert text edit application order change (#29877)Mathias Fußenegger2024-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverts https://github.com/neovim/neovim/pull/29212 and adds a few additional test cases From the spec > All text edits ranges refer to positions in the document they are > computed on. They therefore move a document from state S1 to S2 without > describing any intermediate state. Text edits ranges must never overlap, > that means no part of the original document must be manipulated by more > than one edit. However, it is possible that multiple edits have the same > start position: multiple inserts, or any number of inserts followed by a > single remove or replace edit. If multiple inserts have the same > position, the order in the array defines the order in which the inserted > strings appear in the resulting text. The previous fix seems wrong. The important part: > If multiple inserts have the same position, the order in the array > defines the order in which the inserted strings appear in the > resulting text. Emphasis on _appear in the resulting text_ Which means that in: local edits1 = { make_edit(0, 3, 0, 3, { 'World' }), make_edit(0, 3, 0, 3, { 'Hello' }), } `World` must appear before `Hello` in the final text. That means the old logic was correct, and the fix was wrong.
* Merge pull request #29876 from glepnir/vim-patchzeertzjq2024-07-27
|\ | | | | vim-patch:9.1.{0618,0619,0629}: cannot mark deprecated attributes in completion menu
| * vim-patch:9.1.0629: Rename of pum hl_group is incompletezeertzjq2024-07-27
| | | | | | | | | | | | | | | | | | | | | | Problem: Rename of pum hl_group is incomplete in source. Solution: Also rename the test function. Rename to user_hlattr in code to avoid confusion with pum_extra. Add test with matched text highlighting (zeertzjq). closes: vim/vim#15348 https://github.com/vim/vim/commit/4100852e099133a0c9603e1087e5dc6d82001ce7
| * test(ui/popupmenu_spec): add case of hl_group field in complete itemsglepnir2024-07-27
| | | | | | | | | | Problem: Missing test case for hl_group field in complete items. Solution: Add a test case for hl_group field.
| * test(ui/popupmenu_spec): make highlights more consistentzeertzjq2024-07-27
| |
* | fix(version): return nil with empty stringMaria José Solano2024-07-27
|/
* fix(plines): don't count invalidated virt text in char size (#29863)zeertzjq2024-07-26
| | | | | | Also: - Remove mt_end() and MT_FLAG_DECOR_VIRT_TEXT_INLINE checks, as they are already checked by marktree_itr_check_filter(). - Move ns_in_win() to the last check in decor_redraw_col().
* fix(decor): don't draw invalidated virtual lines (#29858)luukvbaal2024-07-26
|
* fix(tui): set id parameter in OSC 8 sequences (#29840)Gregory Anders2024-07-24
| | | | | | | | | The id parameter is used to communicate to the terminal that two URLs are the same. Without an id, the terminal must rely on heuristics to determine which cells belong together to make a single hyperlink. See the relevant section in the spec [1] for more details. [1]: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#hover-underlining-and-the-id-parameter
* fix(runtime): sync bundled treesitter queriesChristian Clason2024-07-24
|
* Merge pull request #29650 from ruuzia/fix_expression_parser_crashbfredl2024-07-21
|\ | | | | fix: assert failure in VimL expression parser
| * fix: assert failure in VimL expression parserRustum Zia2024-07-17
| |
* | Merge pull request #28873 from luukvbaal/redrawbfredl2024-07-21
|\ \ | | | | | | fix(api): alloc and draw cursor window in nvim__redraw
| * | fix(api): alloc and draw cursor window in nvim__redrawLuuk van Baal2024-07-20
| | | | | | | | | | | | | | | | | | Problem: Unable to move cursor to recently opened window. Solution: Make sure uninitialized window is drawn before trying to move the cursor to it.
* | | fix(marks): revalidate marks whose position did not changeLuuk van Baal2024-07-20
|/ / | | | | | | | | | | | | | | Problem: Marks whose position did not change with the action that invalidated them (right_gravity = false) are not revalidated upon undo. Solution: Remove early return when restoring a marks saved position so that it is still revalidated. Add "move" guards instead.
* / vim-patch:9.1.0601: Wrong cursor position with 'breakindent' when wide char ↵zeertzjq2024-07-19
|/ | | | | | | | | | | | | doesn't fit (#29793) Problem: Wrong cursor position with 'breakindent' when a double-width character doesn't fit in a screen line (mikoto2000) Solution: Include the width of the 'breakindent' properly. (zeertzjq) fixes: vim/vim#15289 closes: vim/vim#15290 https://github.com/vim/vim/commit/b5d6b5caac752fe15856e37fd3abc5459292d4b8
* fix(lsp): inlay hints are rendered in the correct order (#29707)Amit Singh2024-07-17
| | | | | | | | | | | Problem: When there are multiple inlay hints present at the same position, they should be rendered in the order they are received in the response from LSP as per the LSP spec. Currently, this is not respected. Solution: Gather all hints for a given position, and then set it in a single extmark call instead of multiple set_extmark calls. This leads to fewer extmark calls and correct inlay hints being rendered.
* test: fix reporting "no flush received" too early (#29735)zeertzjq2024-07-17
|
* vim-patch:8.2.0281: two placed signs in the same line are not combined (#29757)zeertzjq2024-07-17
| | | | | | | | | | | | Problem: Two placed signs in the same line are not combined. E.g. in the terminal debugger a breakpoint and the PC cannot be both be displayed. Solution: Combine the sign column and line highlight attributes. https://github.com/vim/vim/commit/a2f6e42ded067df8ee682c15aa246491a389b1a0 Nvim already does this in decor_redraw_signs(). Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(column): modifying a sign should update placed signs (#29750)luukvbaal2024-07-17
| | | | | | Problem: Modifying a sign no longer updates already placed signs. Solution: Loop over (newly-exposed) placed decorations when modifying a sign definition. Update placed decor if it belongs to the sign that is modified.
* fix(snippet): modify base indentation when there's actually whitespace (#29670)Maria José Solano2024-07-16
|
* fix(tohtml): support ranges againaltermo2024-07-16
|
* fix(ui): avoid ambiguity about last chunk when flushing halfway (#29718)zeertzjq2024-07-15
|
* vim-patch:9.1.0582: Printed line doesn't overwrite colon when pressing Enter ↵zeertzjq2024-07-14
| | | | | | | | | | | | | in Ex mode Problem: Printed line no longer overwrites colon when pressing Enter in Ex mode (after 9.1.0573). Solution: Restore the behavior of pressing Enter in Ex mode. (zeertzjq) closes: vim/vim#15258 https://github.com/vim/vim/commit/7d664bf0eb2cb25cb77933c8b7f11ca09929e7b8
* vim-patch:8.2.4065: computation overflow with large cound for :yankzeertzjq2024-07-14
| | | | | | | | | Problem: Computation overflow with large cound for :yank. Solution: Avoid an overflow. https://github.com/vim/vim/commit/3cf21b305104e91a28e4ce3a473672b2e88a9469 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test(old): enable Test_address_line_overflow()zeertzjq2024-07-14
| | | | | Nvim doesn't use atol() in getdigits() and doesn't need to check for size of long.
* vim-patch:9.1.0577: Unnecessary checks for v:sizeoflong in test_put.vimzeertzjq2024-07-14
| | | | | | | | | | | Problem: Unnecessary checks for v:sizeoflong in test_put.vim. They are no longer necessary as patch 8.2.3661 has changed the count to be within 32-bit integer limit. Solution: Remove the checks (zeertzjq). closes: vim/vim#15239 https://github.com/vim/vim/commit/69a28f6c0861523b1a9c565b3c882f439ae73ef4
* fix(lua)!: do not use typed table for empty dictAmit Singh2024-07-13
| | | | | | | | | | | | | | | | | Problem: Empty dictionaries are converted into typed tables of the form `{ [true] = 6}` instead of an empty dictionary representation `{}`. This leads to incorrect table representation, along with failure in JSON encoding of such tables as currently tables with only string and number type keys can be encoded. Solution: The typed table logic has been removed from `nlua_push_Dictionary`. The typed table logic is required only for float value conversions which is already handled in `nlua_push_Float`. So, it is(was) no longer required here. Fixes neovim/neovim#29218
* fix(input): handle vim.on_key() properly with ALT and K_SPECIAL (#29677)zeertzjq2024-07-13
|
* build(deps): drop unused bundled bash, python parsers and queriesChristian Clason2024-07-09
| | | | | | | | | | Problem: Neovim bundles treesitter parsers for bash and python but does not use them by default. This dilutes the messaging about the bundled parsers being required for functionality or reasonable out-of-the-box experience. It also increases the risk of query incompatibilities for no gain. Solution: Stop bundling bash and python parser and queries.
* fix(quickfix): make shortmess+=O work with cmdheight=0 (#29609)zeertzjq2024-07-08
|
* vim-patch:9.1.0538: not possible to assign priority when defining a sign ↵zeertzjq2024-07-07
| | | | | | | | | | | | | | | | | | (#29592) Problem: not possible to assign priority when defining a sign (Mathias Fußenegger) Solution: Add the priority argument for the :sign-define ex command and the sign_define() function (LemonBoy) Use the specified value instead of the default one (SIGN_DEF_PRIO) when no priority is explicitly specified in sign_place or :sign place. fixes: vim/vim#8334 closes: vim/vim#15124 https://github.com/vim/vim/commit/b975ddfdf96644b8df808415dee36f99abd48753 Co-authored-by: LemonBoy <thatlemon@gmail.com>
* vim-patch:9.1.0534: completion wrong with fuzzy when cycling back to ↵zeertzjq2024-07-06
| | | | | | | | | | | | | | original (#29588) Problem: completion wrong with fuzzy when cycling back to original (Quan Nguyen) Solution: reset show_match_ok when cp_score is zero (glepnir) fixes: vim/vim#15095 closes: vim/vim#15105 https://github.com/vim/vim/commit/65407ce1d2963e7a758af8fecdcbd67b9a90bdb9 Co-authored-by: glepnir <glephunter@gmail.com>
* fix(lua): don't include text after cursor in completion pattern (#29587)zeertzjq2024-07-06
|
* feat(lsp): drop fswatch, use inotifywait (#29374)Andreas Schneider2024-07-06
| | | | | | | | | | | | | | This patch replaces fswatch with inotifywait from inotify-toools: https://github.com/inotify-tools/inotify-tools fswatch takes ~1min to set up recursively for the Samba source code directory. inotifywait needs less than a second to do the same thing. https://github.com/emcrisostomo/fswatch/issues/321 Also it fswatch seems to be unmaintained in the meantime. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* fix(glob): avoid `subcapture nesting too deep` error (#29520)Zoltán Nyikos2024-07-06
| | | | Use Cmt to evaluate Cond and Elem during match to avoid building the nested capture structure later.
* fix(treesitter): display fields for anonymous nodes in :InspectTreeRiley Bruins2024-07-05
|
* fix(mouse): don't treat click on hsep as click on statusline (#29565)zeertzjq2024-07-05
| | | This allows showing popup menu when right-clicking on hsep or cmdline.
* refactor: add assertion for v_blob in tv_ptr() (#29554)zeertzjq2024-07-04
| | | Also add test for using printf() and id() with a Blob.
* fix(lua): use rawget() to get __call in vim.is_callable() (#29536)Tyler Miller2024-07-04
| | | | | Lua 5.1 uses a "raw get" to retrieve `__call` from a metatable to determine if a table is callable. Mirror this behavior in `vim.is_callable()`.
* test: starting and stopping treesitter highlight (#29546)zeertzjq2024-07-03
|
* fix(treesitter): ensure syntaxset augroup exists (#29542)zeertzjq2024-07-03
| | | | | | | | Problem: Error when calling vim.treesitter.start() and vim.treesitter.stop() in init.lua. Solution: Ensure syntaxset augroup exists after loading synload.vim.