aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* fix(terminal): fix 'mousescroll' not respected in terminal mode (#21415)zeertzjq2022-12-14
|
* Merge pull request #21375 from nojnhuh/highlight-testbfredl2022-12-12
|\ | | | | fix(tests): initialize Screen.colors in API highlight tests
| * fix(tests): initialize Screen.colors in API highlight testsJon Huhn2022-12-10
| |
* | feat(lsp): highlight semantic token modifiers (#21390)Christian Clason2022-12-12
| | | | | | | | | | | | | | | | Apply semantic token modifiers as separate extmarks with corresponding highlight groups (e.g., `@readonly`). This is a low-effort PR to enable the most common use cases (applying, e.g., italics or backgrounds on top of type highlights; language-specific fallbacks like `@global.lua` are also available). This can be replaced by more complicated selector-style themes later on.
* | perf(lsp): update semantic tokens algorithm for parsing modifiers (#21383)jdrouhard2022-12-12
| | | | | | | | | | | | | | | | Instead of testing for every possible modifier type, only test bits up to the highest set in the token array. Saves many bit ops and comparisons when there are no modifiers or when the highest set bit is a lower bit than the highest possible in the legend on average. Can be further simplified when non-luaJIT gets the full bit module (see #21222)
* | fix(diff): handle long lines without crashing (#21389)Lewis Russell2022-12-12
| | | | | | Fixes https://github.com/neovim/neovim/issues/21388
* | fix: vim.opt_local:append ignoring global option value (#21382)Phelipe Teles2022-12-12
| | | | | | Closes https://github.com/neovim/neovim/issues/18225
* | docs #20986Justin M. Keyes2022-12-11
| | | | | | | | | | | | - https://github.com/neovim/tree-sitter-vimdoc v1.2.4 eliminates most errors in pi_netrw.txt, so we can remove that workaround from ignore_parse_error(). - improved codeblock
* | vim-patch:8.2.2870: CmdlineChange event triggered twice for CTRL-R (#21361)zeertzjq2022-12-11
|/ | | | | | | | | | | Problem: CmdlineChange event triggered twice for CTRL-R. Solution: Return CMDLINE_NOT_CHANGED from cmdline_insert_reg(). (closes vim/vim#8219) https://github.com/vim/vim/commit/796139ae3ac89e27ee96dce3c7fdb87d8c839f53 Cherry-pick Test_cmdline_map_cmdlineChanged() from patch 8.2.2851. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(api): set correct curbuf when temporarily changing curwin (#21371)zeertzjq2022-12-10
| | | This is the same code change as https://github.com/vim/vim/commit/6c87bbb4e45515e70ac1728cabd1451063bf427d
* fix(lsp): ignore null responses for semanticTokens request (#21364)fsouza2022-12-10
| | | | | | | | The spec indicates that the response may be `null`, but it doesn't really say what a `null` response means. Since neovim raises an error if the response is `null`, I figured that ignoring it would be the safest bet. Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
* fix(events): skip WinScrolled for newly-created float windows (#21333)zeertzjq2022-12-10
| | | | | Unlike split windows, creating a new floating window does not cause other windows to resize, so it doesn't make much sense to trigger WinScrolled or WinResized when creating a new floating window.
* fix(lsp): followup fixes for semantic tokens support (#21357)jdrouhard2022-12-09
| | | | | | | | | | | | | | | | 1. The algorithm for applying edits was slightly incorrect. It needs to preserve the original token list as the edits are applied instead of mutating it as it iterates. From the spec: Semantic token edits behave conceptually like text edits on documents: if an edit description consists of n edits all n edits are based on the same state Sm of the number array. They will move the number array from state Sm to Sm+1. 2. Schedule the semantic token engine start() call in the client._on_attach() function so that users who schedule_wrap() their config.on_attach() functions (like nvim-lspconfig does) can still disable semantic tokens by deleting the semanticTokensProvider from their server capabilities.
* test: convert another test in test_matchadd_conceal.vim to Lua (#21353)zeertzjq2022-12-09
|
* test(undo_spec): add more tests for writing in Insert modezeertzjq2022-12-09
|
* vim-patch:9.0.1036: undo misbehaves when writing from an insert mode mappingzeertzjq2022-12-09
| | | | | | | | | Problem: Undo misbehaves when writing from an insert mode mapping. Solution: Sync undo when writing. (closes vim/vim#11674) https://github.com/vim/vim/commit/3f8f82772313af9f2417b06651f30988b63e1c96 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(chansend): sending lines to terminal in reverse order on Windows #19315Enan Ajmain2022-12-08
| | | | | | | Problem: `chansend()` on Windows sends lines in reverse order. Cause: Using \n instead of \r\n for newlines on Windows. Solution: on Windows, use CRLF newline characters. Fixes #18501
* vim-patch:9.0.1030: using freed memory with the cmdline popup menuzeertzjq2022-12-09
| | | | | | | | | Problem: Using freed memory with the cmdline popup menu. Solution: Clear the popup menu when clearing the matches. (closes vim/vim#11677) https://github.com/vim/vim/commit/038e6d20e680ce8c850d07f6b035c4e1904c1201 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(lsp): initial support for semantic token highlightingJohn Drouhard2022-12-08
| | | | | | * credit to @smolck and @theHamsta for their contributions in laying the groundwork for this feature and for their work on some of the helper utility functions and tests
* refactor(test): create an lsp-specific helpers.lua fileJohn Drouhard2022-12-08
| | | | * move the code for creating fake rpc servers there
* test(lsp): call clear() before willSave tests (#21336)zeertzjq2022-12-08
| | | Otherwise these two tests cannot run alone and may fail on CI.
* feat(lsp): support willSave & willSaveWaitUntil capability (#21315)Mathias Fußenegger2022-12-08
| | | | | `willSaveWaitUntil` allows servers to respond with text edits before saving a document. That is used by some language servers to format a document or apply quick fixes like removing unused imports.
* vim-patch:9.0.1025: WinScrolled is not triggered when filler lines change ↵zeertzjq2022-12-07
| | | | | | | | | | | (#21325) Problem: WinScrolled is not triggered when filler lines change. Solution: Add "topfill" to the values that WinScrolled triggers on. (closes vim/vim#11668) https://github.com/vim/vim/commit/3fc84dc2c7efecd7c14ce341cd777475058936fd Cherry-pick StopVimInTerminal() from patch 9.0.1010.
* fix(float): fix crash with bufpos and non-existent window (#21319)zeertzjq2022-12-07
|
* test: add more tests for float window bufpos (#21318)zeertzjq2022-12-07
|
* fix(events): save v:event for cmdline autocommands separately (#21316)zeertzjq2022-12-07
|
* fix(secure): crash when hitting escape in prompt (#21283)ii142022-12-05
| | | | | | | | - use pcall when calling vim.secure.read from C - catch keyboard interrupts in vim.secure.read, rethrow other errors - selecting "view" in prompt runs :view command - simplify lua stack cleanup with lua_gettop and lua_settop Co-authored-by: ii14 <ii14@users.noreply.github.com>
* fix(lsp): call show_document with correct argsMathias Fussenegger2022-12-04
| | | | Closes https://github.com/neovim/neovim/issues/21177
* refactor(lsp): extract a _create_server method in lsp_specMathias Fussenegger2022-12-04
|
* vim-patch:8.2.2295: incsearch does not detect empty pattern properlyzeertzjq2022-12-04
| | | | | | | | Problem: Incsearch does not detect empty pattern properly. Solution: Return magic state when skipping over a pattern. (Christian Brabandt, closes vim/vim#7612, closes vim/vim#6420) https://github.com/vim/vim/commit/d93a7fc1a98a58f8101ee780d4735079ad99ae35
* feat(aucmd_win): allow crazy things with hidden buffers (#21250)zeertzjq2022-12-02
| | | | Problem: Crash when doing crazy things with hidden buffers. Solution: Dynamically allocate the list of autocommand windows.
* test: use luv.os_uname for fast platform detection (#21157)kylo2522022-12-02
|
* fix(float): make closing float in another tab return to correct windowzeertzjq2022-12-02
|
* refactor(fs): replace vim.fn/vim.env in vim.fs (#20379)Mike2022-12-01
| | | | Avoid using vim.env and vim.fn in vim.fs functions so that they can be used in "fast" contexts.
* vim-patch:9.0.0969: matchparen highlight is not updated when switching ↵zeertzjq2022-11-29
| | | | | | | | | | | buffers (#21227) Problem: Matchparen highlight is not updated when switching buffers. Solution: Listen to the BufLeave and the BufWinEnter autocmd events. (closes vim/vim#11626) https://github.com/vim/vim/commit/28a896f54d4b2f2b4bef8ef4144dde1673c9d6e7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* docs: fix typos (#21196)dundargoc2022-11-29
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com>
* test: adding/removing winbar should not cause win_pos events (#21226)zeertzjq2022-11-29
|
* Merge pull request #21224 from luukvbaal/vim-9.0.0964zeertzjq2022-11-29
|\ | | | | refactor(ui): statusbar invalidation to win_set_inner_size()
| * vim-patch:9.0.0964: status line not redrawn when 'splitkeep' is "screen"Luuk van Baal2022-11-28
| | | | | | | | | | | | | | | | | | | | | | Problem: Status line of other window not redrawn when dragging it when 'splitkeep' is set to "screen". Solution: Set w_redr_status earlier. (Luuk van Baal, closes vim/vim#11635, closes vim/vim#11632) https://github.com/vim/vim/commit/74a694dbe20bb7dea4e06f474cf62e20f9c92f1d Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
* | refactor: rework parameter validation in vim.secure.trust() (#21223)Gregory Anders2022-11-28
| |
* | feat(secure): add `:trust` command and vim.secure.trust() (#21107)Jlll12022-11-28
|/ | | | | | | | | Introduce vim.secure.trust() to programmatically manage the trust database. Use this function in a new :trust ex command which can be used as a simple frontend. Resolves: https://github.com/neovim/neovim/issues/21092 Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: ii14 <ii14@users.noreply.github.com>
* fix(tests): only get the color map once, even for multiple test filesbfredl2022-11-27
| | | | | | | | | Problem: test/functional/ui/screen.lua would be reloaded for each *_spec.lua file, which causes an extra nvim session to be started to get the color map each time. solution: Mark screen.lua as a preloaded file, but defer the loading of the color map to the first time Screen object is initialised.
* fix(startup): support .exrc or .nvimrc with init.lua (#21181)Kristijan Husak2022-11-26
|
* docs: fix typos (#21168)dundargoc2022-11-26
|
* vim-patch:8.2.2713: folding code not sufficiently testedzeertzjq2022-11-25
| | | | | | | Problem: Folding code not sufficiently tested. Solution: Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#8064) https://github.com/vim/vim/commit/68ffe8cade5e0c52680c00cb9f3f87104fbe653a
* vim-patch:8.2.2684: not enough folding code is testedzeertzjq2022-11-25
| | | | | | | | | | | | Problem: Not enough folding code is tested. Solution: Add more test cases. (Yegappan Lakshmanan, closes vim/vim#8046) https://github.com/vim/vim/commit/5c504f680e63120fea36becfabb8d939d4449e34 Reorder test_fold.vim to match upstream. Cherry-pick Test_fold_expr_error() from patch 8.2.0633. Cherry-pick syntax feature check from patch 8.2.1432. Cherry-pick a delete() call from patch 8.2.2112.
* vim-patch:8.2.4062: match highlighting of tab too shortzeertzjq2022-11-24
| | | | | | | | | | Problem: Match highlighting of tab too short. Solution: Do not stop match highlighting if on a Tab. (Christian Brabandt, closes vim/vim#9507, closes vim/vim#9500) https://github.com/vim/vim/commit/0bbca540f7377889e2154aa5731f6eeffcb5c0cc Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.3940: match highlight disappears when doing incsearch for ":s/pat"zeertzjq2022-11-24
| | | | | | | | | Problem: Match highlight disappears when doing incsearch for ":s/pat". Solution: Only use line limit for incsearch highlighting. (closes vim/vim#9425) https://github.com/vim/vim/commit/94fb8274ca8c93a10102d41c8bcc848f75cb7334 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.3698: match highlighting continues over breakindentzeertzjq2022-11-24
| | | | | | | | | | | Problem: Match highlighting continues over breakindent. Solution: Stop before the end column. (closes vim/vim#9242) https://github.com/vim/vim/commit/0c359af5c0fd106d3f57cc0bb7cef1c89b5e1e10 Cherry-pick Test_matchdelete_redraw() from patch 8.2.1077. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(options): fix local 'sidescrolloff' doesn't work for mouse (#21162)zeertzjq2022-11-23
| | | Missing part of Vim patch 8.1.0864.