aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* 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.
* fix(lsp): retrigger diagnostics request on server cancellation (#31345)Gregory Anders2024-11-25
| | | Co-authored-by: Jesse <github@jessebakker.com>
* refactor(lsp): rename `offset_encoding` to `position_encoding` #31286Yi Ming2024-11-25
| | | | | | | | Problem: LSP spec uses the term "position encoding" where we say "offset encoding". Solution: - Rename it everywhere except `vim.lsp.Client.offset_encoding` (which would be breaking). - Mention "position encoding" in the documentation for `vim.lsp.Client.offset_encoding`.
* fix(grid): double grid_line_start() with ext_messages #31292luukvbaal2024-11-25
| | | | | | Problem: Hit double grid_line_start() assert when redrawing from ext_messages msg_ruler event. Solution: Do not start() batched grid calls when win_redr_ruler() will not puts() anything.
* vim-patch:9.1.0886: filetype: debian control file not detectedChristian Clason2024-11-25
| | | | | | | | | | | | Problem: filetype: debian control file not detected Solution: detect 'debian/control' files as debcontrol filetype (author) closes: vim/vim#16067 https://github.com/vim/vim/commit/57b947e3c3b8d52b914158979263855d785445d5 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* vim-patch:9.1.0883: message history cleanup is missing some tests (#31331)zeertzjq2024-11-24
| | | | | | | | | | | | Problem: message history cleanup is missing some tests Solution: Add tests, refactor common code into did_set_msghistory() (Shougo Matsushita) closes: vim/vim#16078 https://github.com/vim/vim/commit/9f860a14c308f7a9a27a6850d36790615717a710 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Milly <milly.ca@gmail.com>
* fix(lsp): delete bufvar inside WinClosed eventglepnir2024-11-24
| | | | | | | | Problem: floaing preview window can be closed by some ex commands like `only` `fclose` which will not clean the bufvar Solution: use WinClosed event with floating_winnr for clean bufnr, and add test cases for vim.lsp.util.open_floating_preview
* fix(lsp): hover keymap (#31208)andrew snelling2024-11-22
| | | | | * fix: use function call in keymap * fix: test
* fix(api): don't try to get/set option for invalid option name (#31302)Famiu Haque2024-11-22
| | | | | | | | | | | | | | | | Problem: `validate_option_value_args()` returns `OK` even if option name is invalid or if option doesn't have the supported scope, which leads to Neovim still trying to erroneously get/set the option in those cases, which can lead to an assertion failure when `option_has_scope()` is invoked. This issue miraculously doesn't exist in release builds since the assertion is skipped and `(get/set)_option_value_for` returns if there is an error set, but that is not the intended location for that error to be caught. Solution: Make `validate_option_value_args()` return `FAIL` if there is an error set, which causes the API option functions to return early instead of trying to get/set an invalid option.
* test(filetype): symlink detection works after expand('<afile>') (#31307)zeertzjq2024-11-22
| | | Also add a test for #31306, which currently fails.
* fix(treesitter): update queriesChristian Clason2024-11-22
|
* test(autocmd/termxx_spec): fix TextChangedT test flakiness (#31296)zeertzjq2024-11-22
| | | | Problem: The E937 error appears for too short in TextChangedT test. Solution: Only feed an Enter key after seeing the error.
* fix(highlight): 'winhl' shouldn't take priority over API (#31288)zeertzjq2024-11-22
|
* Merge pull request #31193 from bfredl/winrtbfredl2024-11-21
|\ | | | | refactor(windows)!: only support UCRT, even for mingw
| * refactor(windows)!: only support UCRT, even for mingwbfredl2024-11-21
| | | | | | | | | | | | | | | | | | | | | | The newer UCRT runtime has native support for UTF-8, including forcing it as the active codepage even before `main()` is called. This means the c runtime will properly convert windows WCHAR:s into UTF-8 bytes, as early as the argv/argc params to `main()` . Whereas MSVCRT does not support this reliably and required us to use `wmain()`. Only MSVC supports using manifest files directly as source files. The solution for other Windows toolchains is to use a .rc file.
* | test: move exec_lua logic to separate moduleLewis Russell2024-11-21
| | | | | | | | | | | | | | | | | | By making it a separate module, the embedded Nvim session can require this module directly instead of setup code sending over the module via RPC. Also make exec_lua wrap _G.print so messages can be seen in the test output immediately as the exec_lua returns.
* | docs: misc (#31138)dundargoc2024-11-21
| | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | fix(messages): more ext_messages kinds #31279luukvbaal2024-11-20
| | | | | | | | Add kinds for various commands that output a list, the 'wildmode' list, and for number prompts.
* | feat(lsp): deprecate non-method client functionsLewis Russell2024-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecated: - `client.request()` -> `client:request()` - `client.request_sync()` -> `client:request_sync()` - `client.notify()` -> `client:notify()` - `client.cancel_request()` -> `client:cancel_request()` - `client.stop()` -> `client:stop()` - `client.is_stopped()` `client:is_stopped()` - `client.supports_method()` -> `client:supports_method()` - `client.on_attach()` -> `client:on_attach()` Fixed docgen to link class fields to the full function doc.
* | vim-patch:9.1.0880: filetype: C3 files are not recognizedChristian Clason2024-11-20
| | | | | | | | | | | | | | | | | | | | | | Problem: filetype: C3 files are not recognized Solution: detect '*.c3*' files as c3 filetype (Turiiya) closes: vim/vim#16087 https://github.com/vim/vim/commit/c8dfcfc53ba5ed69b5d4e534fd7e8694de014e6a Co-authored-by: Turiiya <34311583+ttytm@users.noreply.github.com>
* | vim-patch:9.1.0876: filetype: openCL files are not recognizedChristian Clason2024-11-20
| | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: openCL files are not recognized Solution: detect '*.cl' files as opencl or lisp filetype, include a opencl syntax and filetype plugin (Wu, Zhenyu) closes: vim/vim#15825 https://github.com/vim/vim/commit/e2c27ca8eff7cc8ec852b531d5a7f328a343a761 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* | vim-patch:9.1.0875: filetype: hyprlang detection can be improvedChristian Clason2024-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: hyprlang detection can be improved Solution: detect '/hypr/*.conf' files as hyprlang filetype, include basic syntax highlighting (Luca Saccarola) fixes: vim/vim#15875 closes: vim/vim#16064 https://github.com/vim/vim/commit/a13bd294ab2d9ab38634c9ec51fa76205af6eb62 Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
* | vim-patch:9.1.0874: filetype: karel files are not detectedChristian Clason2024-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: karel files are not detected Solution: detect '*.kl' files as karel filetype, include syntax and filetype plugin (Kirill Morozov) closes: vim/vim#16075 https://github.com/vim/vim/commit/fdac54d7bbf6d68a8bf741e734b86d0f1998ac86 Co-authored-by: Kirill Morozov <kirill@robotix.pro> Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
* | fix(move): redraw for 'concealcursor' after changing w_wcol (#31276)zeertzjq2024-11-20
| |
* | fix(messages): no message kind for search pattern #31272Tomasz N2024-11-19
| |
* | vim-patch:9.1.0873: filetype: Vivado files are not recognizedChristian Clason2024-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Vivado files are not recognized Solution: detect '*.mss' files as 'mss' filetype (Wu, Zhenyu) references: https://docs.amd.com/r/2020.2-English/ug1400-vitis-embedded/Microprocessor-Software-Specification-MSS closes: vim/vim#15907 https://github.com/vim/vim/commit/a87462a498a883e12ad7699b26bd28f4600b68c6 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* | fix(api): nvim_get_option_value does not clean up on FileType error #31219altermo2024-11-18
| | | | | | | | | | | | | | | | Problem: If there's an error in `FileType` autocmd, the filetype get-opt buffer doesn't get cleaned up. Solution: Call `aucmd_restbuf`.
* | vim-patch:9.1.0869: Problem: curswant not set on gm in folded line (#31247)zeertzjq2024-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: curswant not set on gm in folded line (citizenmatt) Solution: in a folded line, call update_curswant_force() fixes: vim/vim#11596 closes: vim/vim#11994 closes: vim/vim#15398 https://github.com/vim/vim/commit/9848face747ba91282d34a96dcb966bcb410bf2b Co-authored-by: Christian Brabandt <cb@256bit.org>
* | feat(defaults): dot-repeat [<Space> #31186Peter Aronoff2024-11-17
| | | | | | | | | | | | Problem: `[<Space>` and `]<Space>` do not support repetition. Solution: use `operatorfunc` and `g@l` to make these mappings dot repeatable.
* | fix(messages): proper multiline Lua print() messages #31205luukvbaal2024-11-17
| | | | | | | | | | | | Problem: Separate message emitted for each newline present in Lua print() arguments. Solution: Make msg_multiline() handle NUL bytes. Refactor print() to use msg_multiline(). Refactor vim.print() to use print().
* | fix(api): validation, documentation of hl_group #31195luukvbaal2024-11-16
| | | | | | | | | | | | | | | | Problem: Documentation for "hl_group" in nvim_buf_set_extmark() is unclear. "hl_group" in nvim_echo() does not accept highlight group id. Solution: Move documentation for highlight group name/id to first mention of hl_group. Update nvim_echo() to accept highlight group id.
* | feat(ui): don't show unfocusable windows in :tabs, 'tabline' #27984luukvbaal2024-11-16
|/ | | | | | | Problem: Floating windows with focusable set to false can reasonably be expected to be UI elements but are listed in some outputs that should contain only regular windows. Solution: Hide unfocusable floating windows from the default tabline and :tabs.
* test(lua/ui_event_spec): avoid polluting log file (#31229)zeertzjq2024-11-16
|
* vim-patch:9.1.0866: filetype: LLVM IR files are not recognized (#31228)zeertzjq2024-11-16
| | | | | | | | | | | | | | Problem: filetype: LLVM IR files are not recognized Solution: detect '*.ll' files either as lifelines or llvm filetype (Wu, Zhenyu) closes: vim/vim#15824 https://github.com/vim/vim/commit/bc32bbddcfc2671158a4780838766ed2d1e14fa6 N/A patch: vim-patch:7e4b861: runtime(filetype): remove duplicated *.org file pattern Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* fix(ui): no fast context for prompt message kinds #31224luukvbaal2024-11-15
| | | | | | | Problem: No longer able to show prompt messages with vim.ui_attach(). Solution: Do not execute callback in fast context for prompt message kinds. These events must be safe to show the incoming message so the event itself serves to indicate that the message should be shown immediately.
* vim-patch:9.1.0865: filetype: org files are not recognizedChristian Clason2024-11-15
| | | | | | | | | | | | | Problem: filetype: org files are not recognized Solution: detect '*.org' files as 'org' filetype, include filetype and syntax plugin (Luca Saccarola) closes: vim/vim#16054 https://github.com/vim/vim/commit/0684800c853ee5bd6e6736389b1a6ebe6a16a741 Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
* vim-patch:9.1.0855: setting 'cmdheight' may missing output (#31216)zeertzjq2024-11-15
| | | | | | | | | | | | Problem: setting 'cmdheight' may cause hit-enter-prompt and echo output to be missing Solution: Before cleaning the cmdline, check the need_wait_return flag (nwounkn) closes: vim/vim#13432 https://github.com/vim/vim/commit/2e48567007f2becd484a3c3dd0706bf3a0beeae7 Co-authored-by: nwounkn <nwounkn@gmail.com>
* vim-patch:9.1.0864: message history is fixed to 200 (#31215)zeertzjq2024-11-15
| | | | | | | | | | | | Problem: message history is fixed to 200 Solution: Add the 'msghistory' option, increase the default value to 500 (Shougo Matsushita) closes: vim/vim#16048 https://github.com/vim/vim/commit/4bd9b2b2467e696061104a029000e9824c6c609e Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Milly <milly.ca@gmail.com>
* fix(messages)!: vim.ui_attach message callbacks are unsafeLuuk van Baal2024-11-14
| | | | | | | | Problem: Lua callbacks for "msg_show" events with vim.ui_attach() are executed when it is not safe. Solution: Disallow non-fast API calls for "msg_show" event callbacks. Automatically detach callback after excessive errors. Make sure fast APIs do not modify Nvim state.
* fix(tests): needing two calls to setup a screen is cringebfredl2024-11-14
| | | | | | | | | | Before calling "attach" a screen object is just a dummy container for (row, col) values whose purpose is to be sent as part of the "attach" function call anyway. Just create the screen in an attached state directly. Keep the complete (row, col, options) config together. It is still completely valid to later detach and re-attach as needed, including to another session.
* fix(lsp): filter completion candidates based on completeopt (#30945)Kristijan Husak2024-11-13
|
* fix(treesitter): show proper node name error messagesRiley Bruins2024-11-13
| | | | | | | | | | | **Problem:** Currently node names with non-alphanumeric, non underscore/hyphen characters (only possible with anonymous nodes) are not given a proper error message. See tree-sitter issue 3892 for more details. **Solution:** Apply a different scanning logic to anonymous nodes to correctly identify the entire node name (i.e., up until the final double quote)
* fix(startup): report --startuptime error to stderr (#31131)zeertzjq2024-11-13
| | | | | Problem: Crash when initializing for --startuptime errors. Solution: Report the error to stderr, as neither logging nor messages have been initialized yet.
* vim-patch:9.1.0860: tests: mouse_shape tests use hard code sleep value (#31184)zeertzjq2024-11-13
| | | | | | | | | | | | Problem: tests: mouse_shape tests use hard code sleep value (Bram Moolenaar) Solution: Use WaitForAssert() instead (Yee Cheng Chin) related: vim/vim#12157 closes: vim/vim#16042 https://github.com/vim/vim/commit/24078e39cd10b8a65af5297ebe12ddf1e550167a Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:9.1.0853: filetype: kubernetes config file not recognizedChristian Clason2024-11-12
| | | | | | | | | | | | Problem: filetype: kubernetes config file not recognized Solution: detect '/.kube/config' file as yaml filetype (Jonathan Lopez) closes: vim/vim#11076 https://github.com/vim/vim/commit/6fbf63de865001dedafc227465e651926cf6f6dc Co-authored-by: Jonathan Lopez <jonathanglopez@gmail.com>
* Merge pull request #31137 from bfredl/hlagainbfredl2024-11-11
|\ | | | | refactor(tests): use more global highlight definitions
| * refactor(tests): use more global highlight definitionsbfredl2024-11-11
| |