aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* 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.
* vim-patch:partial:9.0.0917: the WinScrolled autocommand event is not enough ↵zeertzjq2022-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#21161) Problem: The WinScrolled autocommand event is not enough. Solution: Add WinResized and provide information about what changed. (closes vim/vim#11576) https://github.com/vim/vim/commit/35fc61cb5b5eba8bbb9d8f0700332fbab38f40ca Omit "func_name" comment in tv_dict_extend(): Vim9 script only. Skip layout locking and E1312. Skip list_alloc_with_items() and list_set_item(). Since this overrides remaining changes in patch 9.0.0913, that patch can now be marked as fully ported: vim-patch:9.0.0913: only change in current window triggers the WinScrolled event N/A patches for version.c: vim-patch:9.0.0919: build failure with tiny features Problem: Build failure with tiny features. Solution: Adjust #ifdef's. https://github.com/vim/vim/commit/9c5b7cb4cf67c64648a324e9dfd1e17d793335a4 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test: simplify platform detection (#21020)dundargoc2022-11-22
| | | | | Extend the capabilities of is_os to detect more platforms such as freebsd and openbsd. Also remove `iswin()` helper function as it can be replaced by `is_os("win")`.
* feat(diagnostic): add `suffix` option to `virt_text` config (#21140)beardedsakimonkey2022-11-20
| | | | | | | This introduces a `suffix` option to the `virt_text` config in `vim.diagnostic.config()`. The suffix can either be a string which is appended to the diagnostic message or a function returning such. The function receives a `diagnostic` argument, which is the diagnostic table of the last diagnostic (the one whose message is rendered as virt text).
* feat(diagnostic): add `suffix` option to `open_float()` (#21130)beardedsakimonkey2022-11-20
| | | | | | | | | | | Closes #18687 This introduces a `suffix` option to `vim.diagnostic.open_float()` (and consequently `vim.diagnostic.config()`) that appends some text to each diagnostic in the float. It accepts the same types as `prefix`. For multiline diagnostics, the suffix is only appended to the last line. By default, the suffix will render the diagnostic error code, if any.
* test: add a test for #18222zeertzjq2022-11-20
|
* vim-patch:9.0.0915: WinScrolled may trigger immediately when definedzeertzjq2022-11-20
| | | | | | | | | Problem: WinScrolled may trigger immediately when defined. Solution: Initialize the fields in all windows. (closes vim/vim#11582) https://github.com/vim/vim/commit/29967732761d1ffb5592db5f5aa7036f5b52abf1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:partial:9.0.0913: only change in current window triggers the ↵zeertzjq2022-11-20
| | | | | | | | | | | | | | | | | WinScrolled event Problem: Only a change in the current window triggers the WinScrolled event. Solution: Trigger WinScrolled if any window scrolled or changed size. (issue vim/vim#11576) https://github.com/vim/vim/commit/0a60f79fd0c328b47b36279a95282e9f8d9e7512 Skip locking of window layout and E1312. Copy the latest version of all WinScrolled tests from Vim. Note: patch 9.0.0915 is needed for the Lua tests to pass. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test: use isCI to simplify CI detection (#21134)dundargoc2022-11-20
|
* perf(diagnostic): use api variable and improve validate (#21111)Raphael2022-11-19
| | | | | * fix(diagnostic): use api variable and improve validate * fix: fix test case
* test: fix failing tui_spec.lua tests (#21117)Jakub Łuczyński2022-11-19
| | | | | | | * refactor(test): use exec_lua * fix(test): fix failing tui_spec tests test is failing when path of tty-test does not fit cmdline
* feat: add vim.secure.read()Gregory Anders2022-11-17
| | | | | | | | | This function accepts a path to a file and prompts the user if the file is trusted. If the user confirms that the file is trusted, the contents of the file are returned. The user's decision is stored in a trust database at $XDG_STATE_HOME/nvim/trust. When this function is invoked with a path that is already marked as trusted in the trust database, the user is not prompted for a response.
* test: add a Lua test for swap file created before bootzeertzjq2022-11-17
| | | | Change the file modification time instead of uptime.
* fix(api): nvim_win_set_cursor redraw cursorcolumn for non-current window ↵Jlll12022-11-17
| | | | | | (#21072) fix #19063 this fixes the cursorcolumn not being redrawn for non-current windows in `nvim_win_set_cursor()`
* fix(api): nvim_buf_get_text regression (#21071)Lewis Russell2022-11-15
|
* vim-patch:9.0.0884: mouse shape remains in op-pending mode after failed ↵zeertzjq2022-11-15
| | | | | | | | change (#21066) Problem: Mouse shape remains in op-pending mode after failed change. Solution: Reset finish_op and restore it. (closes vim/vim#11545) https://github.com/vim/vim/commit/cdeb65729d96c90320b9009e583ade305c396f29
* test: don't skip parser_spec on windows (#20294)dundargoc2022-11-15
|
* fix(lua): make `vim.deepcopy` work with `vim.NIL`Max2022-11-14
| | | | | | | | style: changed double quotes to single quotes feat: add tests fix tests
* feat(lua-api): avoid unnecessary allocations (#19877)Lewis Russell2022-11-14
| | | | Lua makes (or reuses) an internal copy of strings, so we can safely push buf pointers onto the stack.
* feat(test): add Lua forms for API methods (#20152)Lewis Russell2022-11-14
|