aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* vim-patch:9.1.0911: Variable name for 'messagesopt' doesn't match short namezeertzjq2024-12-08
| | | | | | | | | | Problem: Variable name for 'messagesopt' doesn't match short name (after v9.1.0908) Solution: Change p_meo to p_mopt. Add more details to docs. closes: vim/vim#16182 https://github.com/vim/vim/commit/8cc43daee1f485c9abf1de3c638cce7835b9f861
* vim-patch:9.1.0910: 'messagesopt' does not check max wait timezeertzjq2024-12-08
| | | | | | | | | | | | | Problem: 'messagesopt' does not check max wait time (after v9.1.0908) Solution: Check for max wait value (Shougo Matsushita) closes: vim/vim#16183 https://github.com/vim/vim/commit/d9e9f89e0ffd6e7ce5e2a7f8f1ace5471e37c210 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
* feat(ex_cmds): :sleep! hides the cursor while sleeping (#31493)zeertzjq2024-12-07
| | | | | | | | | | Problem: :sleep! not hiding the cursor is an arbitrary difference from Vim without obvious justification, and Vim's behavior isn't easily achievable in Nvim. Solution: Make :sleep! hide the cursor while sleeping. Ref: https://github.com/neovim/neovim/commit/6a01b3fcc361960e559db459e1524418bc76dd66 https://github.com/neovim/neovim/commit/b5c0ade43790cf18f6a54858ddad30d8d9667cf9
* Merge pull request #31475 from luukvbaal/delgravitybfredl2024-12-07
|\ | | | | fix(marks): check gravity at range bounds when deleting text
| * fix(marks): skip right_gravity marks when deleting textLuuk van Baal2024-12-06
| | | | | | | | | | | | | | | | | | | | Problem: Marks that are properly restored by the splice associated with an undo edit, are unnecessarily pushed to the undo header. This results in incorrect mark tracking in the "copy_only" save/restore completion path. Solution: Avoid pushing left gravity marks at the beginning of the range, and right gravity marks at the end of the range to the undo header.
* | fix(treesitter): #trim! range for nodes ending at col 0 #31488Riley Bruins2024-12-07
| | | | | | | | | | | | | | | | | | Problem: char-wise folding for `#trim!` ranges are improperly calculated for nodes that end at column 0, due to the way `get_node_text` works. Solution: Add the blank line that `get_node_text` removes for for nodes ending at column 0. Also properly set column positions when performing linewise trims.
* | fix: remove vim.lsp._with_extendLewis Russell2024-12-07
| | | | | | | | Not used anywhere.
* | vim-patch:9.1.0908: not possible to configure :messages (#31492)zeertzjq2024-12-07
| | | | | | | | | | | | | | | | | | | | | | Problem: not possible to configure :messages Solution: add the 'messagesopt' option (Shougo Matsushita) closes: vim/vim#16068 https://github.com/vim/vim/commit/51d4d84d6a7159c6ce9e04b36f8edc105ca3794b Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: h_east <h.east.727@gmail.com>
* | feat(stdlib): vim.json.encode(...,{escape_slash:boolean}) #30561Bartłomiej Maryńczak2024-12-06
| | | | | | | | | | | | | | | | | | | | | | | | Problem: vim.json.encode escapes every slash in string values (for example in file paths), and is not optional. Use-case is for preventing HTML injections (eg. injecting `</script>` closing tag); in the context of Nvim this is rarely useful. Solution: - Add a `escape_slash` flag to `vim.json.encode`. - Defaults to `false`. (This is a "breaking" change, but more like a bug fix.)
* | test(treesitter): add a simple testutil fileRiley Bruins2024-12-06
| | | | | | | | The util file, for now, just abstracts the common `run_query` function.
* | feat(treesitter): #trim! can trim all whitespaceRiley Bruins2024-12-06
| | | | | | | | | | | | | | | | | | | | This commit also implements more generic trimming, acting on all whitespace (charwise) rather than just empty lines. It will unblock https://github.com/nvim-treesitter/nvim-treesitter/pull/3442 and allow for properly concealing markdown bullet markers regardless of indent width, e.g.
* | fix(filetype): make filetype detection work with :doautocmd (#31470)zeertzjq2024-12-06
| |
* | fix(completion): avoid deleting text when completion leader changes #31448luukvbaal2024-12-06
| | | | | | | | | | | | | | Problem: When completion leader changes, text that might be reinserted immediately after is deleted. This unnecessarily affects extmarks. #31387 restored the original extmarks but that prevents end_right_gravity marks from growing. Solution: Avoid deleting leader text that will be reinserted.
* | fix(events): don't expand `args.file` for Lua callback (#31473)zeertzjq2024-12-06
|/ | | | | | | | Problem: In an autocommand Lua callback whether `args.file` is expanded depends on whether `expand('<afile>')` has been called. Solution: Always use the unexpanded file name for `args.file`. Related to #31306 and vim/vim#16106. This doesn't provide `sfname`, but at least makes `args.file` have a consistent value.
* vim-patch:9.1.0906: filetype: Nvidia PTX files are not recognizedChristian Clason2024-12-06
| | | | | | | | | | | | | Problem: filetype: Nvidia PTX files are not recognized Solution: detect '*.ptx' files as ptx filetype (Yinzuo Jiang) Reference: https://docs.nvidia.com/cuda/parallel-thread-execution/ closes: vim/vim#16171 https://github.com/vim/vim/commit/bdb5f85a5189534653f36e92b1bc780ca8d25218 Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
* docs: graduate intro.txt to "flow layout" #31462Justin M. Keyes2024-12-05
| | | - move credits and backers to credits.txt
* fix(defaults): don't replace keycodes in Visual search mappings (#31460)zeertzjq2024-12-05
| | | Also remove "silent" to be more consistent with Normal mode search.
* vim-patch:9.1.0905: Missing information in CompleteDone event (#31455)glepnir2024-12-05
| | | | | | | | | Problem: Missing information in CompleteDone event Solution: add complete_word and complete_type to v:event dict (glepnir) closes: vim/vim#16153 https://github.com/vim/vim/commit/1c5a120a701fcf558617c4e70b5a447778f0e51d
* test(system_spec): check for .git dir before using git (#31458)zeertzjq2024-12-05
|
* test(screen): adjust screen state per stylua #31441luukvbaal2024-12-04
| | | | | | | | | | | | | | | | | | | | | | | | | Before: screen:expect({ | screen:expect({ grid = [[ | grid = [[ {10:>!}a | | line ^1 | {7: }b | | {1:~ }|*4 {10:>>}c | | ]], messages={ { {7: }^ | | content = { { "\ntest\n[O]k: ", 6, 11 } }, {1:~ }|*9 | kind = "confirm" | | } } ]] | }) }) After: screen:expect([[ | screen:expect({ {10:>!}a | | grid = [[ {7: }b | | line ^1 | {10:>>}c | | {1:~ }|*4 {7: }^ | | ]], {1:~ }|*9 | messages = { { | | content = { { "\ntest\n[O]k: ", 6, 11 } }, ]]) | kind = "confirm" | } }, | })
* Merge #31358 fix test failures for release / tarball buildsJustin M. Keyes2024-12-04
|\
| * test(main_spec): make "nvim -v" test agnostic to build typeJames McCoy2024-12-03
| | | | | | | | In release builds, the Compilation: line is omitted so the build is reproducible. Since the "fall-back for $VIM" line is always present, check for that instead.
| * test(version_spec): expect vim.NIL, not nil, for "build" if not in a git cloneJames McCoy2024-12-03
| |
| * test(main_spec): use CMakePresets.json instead of .git for root markerJames McCoy2024-12-03
| |
* | fix(vim.system): close pipe handles after process handleLewis Russell2024-12-04
| | | | | | | | Fixes #30846
* | defaults: disable 'number', 'relativenumber', and 'signcolumn' in terminal ↵Gregory Anders2024-12-04
| | | | | | | | buffers (#31443)
* | fix(column): check if signcolumn changed in all windows #31439luukvbaal2024-12-04
| |
* | feat(lsp): deprecate vim.lsp.start_client #31341Maria José Solano2024-12-04
| | | | | | | | | | | | | | | | Problem: LSP module has multiple "start" interfaces. Solution: - Enhance vim.lsp.start - Deprecate vim.lsp.start_client
* | vim-patch:9.1.0902: filetype: Conda configuration files are not recognized ↵zeertzjq2024-12-04
|/ | | | | | | | | | | (#31445) Problem: filetype: Conda configuration files are not recognized Solution: detect '.condarc' and 'condarc' files as yaml filetype. (zeertzjq) closes: vim/vim#16162 https://github.com/vim/vim/commit/876de275cb3affa5910664cc52a5177c214313e8
* test(vterm): move test functions into vterm_test fixtureJames McCoy2024-12-02
| | | | | | | In order to run unittests with a release build, we need the test functions to be accessible when NDEBUG is defined. Moving the functions into the test fixture ensures they are available and only available for use by the unit tests.
* vim-patch:9.1.0900: Vim9: digraph_getlist() does not accept bool arg (#31431)zeertzjq2024-12-03
| | | | | | | | | | | | Problem: Vim9: digraph_getlist() does not accept bool argument (Maxim Kim) Solution: accept boolean as first argument (Yegappan Lakshmanan) fixes: vim/vim#16154 closes: vim/vim#16159 https://github.com/vim/vim/commit/198ada3d9f48c6556d20c4115ec500555b118aad Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(extmark): builtin completion can still affect nearby extmarks #31387luukvbaal2024-12-02
| | | | | | | Problem: Built-in completion can still affect nearby extmarks. #31384 Solution: Restore extmarks when completion leader changes.
* test(treesitter): global highlight definitions and fold test #31407luukvbaal2024-12-02
| | | | Add test for foldtext= highlighting. Change file to global highlight definitions while at it.
* fix(api): deprecate nvim_subscribe, nvim_unsubscribe #30456Justin M. Keyes2024-12-02
| | | | | | | | | | | | | | | | | | | | | | | | Problem: - nvim_subscribe, nvim_unsubscribe were deprecated in aec4938a21a02d279d13a9eb64ef3b7cc592c374 but this wasn't set in the API metadata. - The function annotations ``` FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY FUNC_API_DEPRECATED_SINCE(13) ``` cause this test to fail: ``` RUN T3 api metadata functions are compatible with old metadata or have new level: 3.00 ms ERR test/functional/api/version_spec.lua:135: function vim_subscribe was removed but exists in level 0 which nvim should be compatible with stack traceback: test/functional/api/version_spec.lua:135: in function <test/functional/api/version_spec.lua:128> ``` Solution: - Set the API metadata. - Rearrange the annotations so that FUNC_API_DEPRECATED_SINCE is 2nd: ``` FUNC_API_SINCE(1) FUNC_API_DEPRECATED_SINCE(13) FUNC_API_REMOTE_ONLY ```
* fix(ui): clamp 'cmdheight' for other tabpages on screen resize (#31419)zeertzjq2024-12-02
|
* fix(api): make `nvim_set_hl()` respect all `cterm` attributes (#31390)Evgeni Chasnovski2024-12-02
|
* vim-patch:9.1.0899: default for 'backspace' can be set in C code (#31416)zeertzjq2024-12-02
| | | | | | | | | | | | | | | Problem: default for 'backspace' can be set in C code Solution: promote the default for 'backspace' from defaults.vim to the C code (Luca Saccarola) closes: vim/vim#16143 https://github.com/vim/vim/commit/959ef61430bdd8fb982b38bd3347d90251255cfc N/A patches: vim-patch:9.1.0895: default history value is too small vim-patch:075aeea: runtime(doc): document changed default value for 'history' Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
* Merge pull request #31370 from glepnir/vim-9.1.0867zeertzjq2024-11-30
|\ | | | | vim-patch:9.1.{0867,0891,0896}
| * vim-patch:9.1.0896: completion list wrong after v9.1.0891glepnir2024-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: completion list wrong after v9.1.0891 Solution: update compl_mach_array after leader change (glepnir) compl_shown_match update not correct after refactoring in v9.1.0891 Unfortunately, this regressed what item is selected after leader change. So generate compl_match_array before updating compl_shown_match range, and split generate compl_match_array into range match_head fixes: https://github.com/vim/vim/issues/16128 closes: https://github.com/vim/vim/pull/16129 https://github.com/vim/vim/commit/a49c077a883b2566882df9069385ed1e1277ca64
* | vim-patch:9.1.0898: runtime(compiler): pytest compiler not includedChristian Clason2024-11-30
| | | | | | | | | | | | | | | | | | | | | | | | Problem: runtime(compiler): pytest compiler not included Solution: include pytest compiler, update the compiler completion test (Konfekt) closes: vim/vim#16130 https://github.com/vim/vim/commit/3c2596a9e967910143d41fbb9615614ab36d43a7 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
* | vim-patch:9.1.0897: filetype: pyrex files are not detectedChristian Clason2024-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: pyrex files are not detected Solution: detect '*.pxi' and '*.pyx+' as pyrex filetype (user202729) References: https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#cython-file-types https://www.csse.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/using_with_c++.html closes: vim/vim#16136 https://github.com/vim/vim/commit/aa16b30552f0c6a00dcc761e3954cd5266bf106a Co-authored-by: user202729 <25191436+user202729@users.noreply.github.com>
* | feat(lsp): support `textDocument/foldingRange` (#31311)Yi Ming2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor(shared): extract `vim._list_insert` and `vim._list_remove` * feat(lsp): add `vim.lsp.foldexpr()` * docs(lsp): add a todo for state management * feat(lsp): add `vim.lsp.folding_range.foldclose()` * feat(lsp): schedule `foldclose()` if the buffer is not up-to-date * feat(lsp): add `vim.lsp.foldtext()` * feat(lsp): support multiple folding range providers * refactor(lsp): expose all folding related functions under `vim.lsp.*` * perf(lsp): add `lsp.MultiHandler` for do `foldupdate()` only once
* | vim-patch:9.1.0892: the max value of 'cmdheight' is limited by other ↵zeertzjq2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tabpages (#31378) Problem: the max value of 'cmdheight' is limited by other tabpages Solution: Limit the maximum value of 'cmdheight' to the current tabpage only. (Milly) The Help says that cmdheight is local to the tab page, but says nothing about the maximum value depending on the state of all tab pages. Users may wonder why they can't increase cmdheight when there are still rows available on the current tab page. This PR changes the behavior of cmdheight so that its maximum value depends only on the state of the current tab page. Also, since magic numbers were embedded in various places with the minimum value of cmdheight being 1, we defined a constant to make it easier to understand. closes: vim/vim#16131 https://github.com/vim/vim/commit/2cddf0e85a7f8304476397e1c51dcd0e41835ac3 Cherry-pick Test_cmdheight_not_changed() from patch 9.0.0187. Co-authored-by: Milly <milly.ca@gmail.com>
* | vim-patch:8.2.2993: 'fileencodings' default value should depend on ↵zeertzjq2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | 'encoding' (#31379) Problem: 'fileencodings' default value should depend on 'encoding'. (Gary Johnson) Solution: When 'encoding' is "utf-8" use a different default value for 'fileencodings'. https://github.com/vim/vim/commit/5ffefbb35aba2448099314a9e09714d2f3b2b1bd Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.1.0894: No test for what the spotbug compiler parseszeertzjq2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No test for what the spotbug compiler parses (after commit: 65311c6f472de67b368) Solution: Test &makeprg for the SpotBugs compiler plugin (Aliaksei Budavei) closes: vim/vim#16096 https://github.com/vim/vim/commit/60ddb1a14025dc061908a1b7a0a3a82b4bbed223 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
* | vim-patch:9.1.0890: %! item not allowed for 'rulerformat' (#31369)zeertzjq2024-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: %! item not allowed for 'rulerformat' (yatinlala) Solution: also allow to use %! for rulerformat option (Yegappan Lakshmanan) fixes: vim/vim#16091 closes: vim/vim#16118 https://github.com/vim/vim/commit/ac023e8baae65584537aa3c11494dad6f71770af Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | perf(vim.text): use lookup table implementation for hex encoding (#30080)Gregory Anders2024-11-26
| | | | | | Co-authored-by: glepnir <glephunter@gmail.com>
* | fix(lua): remove vim.loader.disable() #31344Justin M. Keyes2024-11-26
|/ | | | | | | | | | | | | | Problem: `vim.loader.disable` does not conform to `:help dev-name-common` and `:help dev-patterns`. Solution: - Add `enable` parameter to `vim.loader.enable` - Remove `vim.loader.disable` - Note the change in `:help news-breaking-dev` (HEAD changes). - This is not a breaking change (except to "HEAD") because `vim.loader` is marked "experimental". previous: 26765e8461c1ba1e9a351632212cf89900221781
* vim-patch:9.1.0888: leftcol property not available in getwininfo() (#31349)zeertzjq2024-11-26
| | | | | | | | | | Problem: leftcol property not available in getwininfo() Solution: add leftcol property property (glepnir) closes: vim/vim#16119 https://github.com/vim/vim/commit/0a850673e3d4193d55f47bcbbc0b0da5f155307d Co-authored-by: glepnir <glephunter@gmail.com>
* fix(defaults): omit empty line from unimpaired mapping messages (#31347)Marcus Caisey2024-11-25
| | | | | | | | | | | | | | | | | | | | | Problem: The default unimpaired mappings display an empty line after the command's output. This results (with default configuration) in the `Press ENTER or type command to continue` prompt to be displayed, like so: ``` (2 of 16): item2 Press ENTER or type command to continue ``` Solution: The cause is that we're checking the second return value from `pcall(vim.api.nvim_cmd, opts, {})` to determine whether the call was successful. `nvim_cmd` returns an empty string on success, so this value is an empty string in the successful path which we then display. The fix is simple: check the first return value instead which is the "status code" of the call.