aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | | vim-patch:9.0.1907: No support for liquidsoap filetypesChristian Clason2023-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No support for liquidsoap filetypes Solution: Add liquidsoap filetype detection code closes: vim/vim#13111 https://github.com/vim/vim/commit/6b5efcdd8e976d2ab2554b22c4220c5e88de4717 Co-authored-by: Romain Beauxis <toots@rastageeks.org>
* | | test(ui/fold_spec): click on multibyte "foldclosed" (#25216)zeertzjq2023-09-17
| |/ |/|
* | feat(folds): support virtual text format for 'foldtext' (#25209)zeertzjq2023-09-17
| | | | | | Co-authored-by: Lewis Russell <lewis6991@gmail.com>
* | Merge pull request #25190 from glepnir/echo_hlbfredl2023-09-17
|\ \ | | | | | | fix(highlight): correct hi command output
| * | fix(highlight): correct hi command outputglepnir2023-09-17
| |/
* | fix(lua): not using global value in vim.opt_global (#25196)Phelipe Teles2023-09-17
| |
* | test(plugin/man_spec): use pesc() on actual_file in pattern (#25199)zeertzjq2023-09-17
| |
* | Merge pull request #25186 from llllvvuu/fix/preserve_marktree_orderinhbfredl2023-09-16
|\ \ | | | | | | fix(marktree): preserve ordering in `marktree_move`
| * | fix(test): more tests for marktreebfredl2023-09-16
| | | | | | | | | | | | Co-Authored-By: L Lllvvuu <git@llllvvuu.dev>
* | | fix(languagetree): apply `resolve_lang` to `metadata['injection.language']`L Lllvvuu2023-09-16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | `resolve_lang` is applied to `@injection.language` when it's supplied as a capture: https://github.com/neovim/neovim/blob/f5953edbac14febce9d4f8a3c35bdec1eae26fbe/runtime/lua/vim/treesitter/languagetree.lua#L766-L768 If we want to support `metadata['injection.language']` (as per #22518 and [tree-sitter upstream](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection)) then the behavior should be consistent. Fixes: nvim-treesitter/nvim-treesitter#4918
* | Merge pull request #25183 from llllvvuu/fix/marktree_movebfredl2023-09-16
|\ \ | | | | | | fix(marktree): off-by-one error in `marktree_move`
| * | fix(marktree): off-by-one error in `marktree_move`L Lllvvuu2023-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you would insert element X at position j, then if you are moving that same element X from position i < j, you should move it to position j - 1, because you are losing an element. This error caused a gap to be left in the array, so that it looked like [x, null, y] instead of [x, y], where len = 2. This triggered #25147. Fixes: #25147
* | | Merge pull request #25078 from glepnir/aubfredl2023-09-16
|\ \ \ | |/ / |/| | fix(float): don't trigger au event when enter is false
| * | fix(ui): doesn't trigger au event when enter is falseglepnir2023-09-15
| | |
* | | fix(extmarks): overlay virt_text position after 'showbreak' (#25175)zeertzjq2023-09-15
| | | | | | | | | Also make virt_text_hide work properly.
* | | fix: invoke changed_bytes when rewriting <Tab> char #25125Ilia Choly2023-09-15
| | | | | | | | | | | | | | | | | | | | | When tabstop and shiftwidth are not equal, tabs are inserted as individual spaces and then rewritten as tab characters in a second pass. That second pass did not call changed_bytes which resulted in events being omitted. Fixes #25092
* | | test(windows): unskip working tests (#25153)dundargoc2023-09-15
| | | | | | | | | Also simplify home detection with os_homedir()
* | | fix(extmarks): draw virt_text below diff filler lines properly (#25170)zeertzjq2023-09-15
| | | | | | | | | fix(extmarks): draw virt_text properly below diff filler lines
* | | fix(extmarks): fix wrong virt_text position after wrapped TAB (#25168)zeertzjq2023-09-15
| | |
* | | fix(extmarks): properly handle virt_text on next screen line (#25166)zeertzjq2023-09-15
| |/ |/| | | | | TODO: virt_text_hide doesn't work for the first char on a wrapped screen line, and it's not clear how to fix that.
* | fix(float): update position of anchored windows first (#25133)zeertzjq2023-09-14
| |
* | feat(extmark): support proper multiline rangesbfredl2023-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The removes the previous restriction that nvim_buf_set_extmark() could not be used to highlight arbitrary multi-line regions The problem can be summarized as follows: let's assume an extmark with a hl_group is placed covering the region (5,0) to (50,0) Now, consider what happens if nvim needs to redraw a window covering the lines 20-30. It needs to be able to ask the marktree what extmarks cover this region, even if they don't begin or end here. Therefore the marktree needs to be augmented with the information covers a point, not just what marks begin or end there. To do this, we augment each node with a field "intersect" which is a set the ids of the marks which overlap this node, but only if it is not part of the set of any parent. This ensures the number of nodes that need to be explicitly marked grows only logarithmically with the total number of explicitly nodes (and thus the number of of overlapping marks). Thus we can quickly iterate all marks which overlaps any query position by looking up what leaf node contains that position. Then we only need to consider all "start" marks within that leaf node, and the "intersect" set of that node and all its parents. Now, and the major source of complexity is that the tree restructuring operations (to ensure that each node has T-1 <= size <= 2*T-1) also need to update these sets. If a full inner node is split in two, one of the new parents might start to completely overlap some ranges and its ids will need to be moved from its children's sets to its own set. Similarly, if two undersized nodes gets joined into one, it might no longer completely overlap some ranges, and now the children which do needs to have the have the ids in its set instead. And then there are the pivots! Yes the pivot operations when a child gets moved from one parent to another.
* | fix(decorations): better approximation of botline #24794Jaehwang Jung2023-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: * The guessed botline might be smaller than the actual botline e.g. when there are folds and the user is typing in insert mode. This may result in incorrect treesitter highlights for injections. * botline can be larger than the last line number of the buffer, which results in errors when placing extmarks. Solution: * Take a more conservative approximation. I am not sure if it is sufficient to guarantee correctness, but it seems to be good enough for the case mentioned above. * Clamp it to the last line number. Co-authored-by: Lewis Russell <me@lewisr.dev>
* | fix(tests): set SHELL=sh #24941Sergey Slipchenko2023-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Some tests fail with $SHELL=fish #6172 Related: https://github.com/neovim/neovim/pull/6176 Solution: Replace "echo -n" with "printf", because "echo" in sh may be provided as a shell builtin, which does not accept an "-n" flag to avoid a trailing newline (e.g. on macos). "printf" is more portable (defined by POSIX) and it does not output a trailing newline by itself. Fixes #6172 TODO: Other test failures may be related to "session leader" issue: https://github.com/neovim/neovim/issues/2354 Checked by running `:terminal ./build/bin/tty-test` from Nvim with `shell=/bin/fish` (inherited from `$SHELL`) and it indeed complains about "process does not own the terminal". With `shell=sh` it doesn't complain. And unsetting `$SHELL` seems to make `nvim` to fall back to `shell=sh`. FAILED test/functional/terminal/tui_spec.lua @ 1017: TUI paste: terminal mode test/functional/terminal/tui_spec.lua:1024: Row 1 did not match. Expected: |*tty ready | |*{1: } | |* | | | |{5:^^^^^^^ }| |{3:-- TERMINAL --} | |{3:-- TERMINAL --} | Actual: |*process does not own the terminal | |* | |*[Process exited 2]{1: } | | | |{5:^^^^^^^ }| |{3:-- TERMINAL --} | |{3:-- TERMINAL --} | To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. stack traceback: test/functional/ui/screen.lua:622: in function '_wait' test/functional/ui/screen.lua:352: in function 'expect' test/functional/terminal/tui_spec.lua:1024: in function <test/functional/terminal/tui_spec.lua:1017> FAILED test/functional/terminal/tui_spec.lua @ 1551: TUI forwards :term palette colors with termguicolors test/functional/terminal/tui_spec.lua:1567: Row 1 did not match. Expected: |*{1:t}ty ready | | | |* | | | |{2:^^^^^^^ }| | | |{3:-- TERMINAL --} | Actual: |*{1:p}rocess does not own the terminal | | | |*[Process exited 2] | | | |{2:^^^^^^^ }| | | |{3:-- TERMINAL --} | To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. stack traceback: test/functional/ui/screen.lua:622: in function '_wait' test/functional/ui/screen.lua:352: in function 'expect' test/functional/terminal/tui_spec.lua:1567: in function <test/functional/terminal/tui_spec.lua:1551>
* | Merge pull request #24901 from faergeek/more-intuitive-cursor-updatebfredl2023-09-11
|\ \ | | | | | | fix(api): more intuitive cursor updates in nvim_buf_set_text
| * | fix(api): more intuitive cursor updates in nvim_buf_set_textSergey Slipchenko2023-09-11
| | | | | | | | | | | | Fixes #22526
* | | vim-patch:9.0.1891: No runtime support for MojoChristian Clason2023-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No runtime support for Mojo Solution: Add basic filetype and syntax plugins closes: vim/vim#13062 closes: vim/vim#13063 https://github.com/vim/vim/commit/0ce2c594d0704f27a16d2c13fce85d596cc91489 Co-authored-by: Mahmoud Abduljawad <mahmoud@masaar.com>
* | | vim-patch:9.0.1894: CI: trailing whitespace in testszeertzjq2023-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: CI: trailing white space in tests Solution: clean up the trailing white space https://github.com/vim/vim/commit/e5f7cd0a60d0eeab84f7aeb35c13d3af7e50072e Co-authored-by: Christian Brabandt <cb@256bit.org>
* | | vim-patch:9.0.1893: CI: strptime test fails on BSD14zeertzjq2023-09-11
|/ / | | | | | | | | | | | | | | | | Problem: CI: strptime test fails on BSD14 Solution: Skip the test https://github.com/vim/vim/commit/983d808674f998eaea12b302028de45f1c6857cd Co-authored-by: Christian Brabandt <cb@256bit.org>
* | fix(mouse): click on 'statuscolumn' with 'rightleft' (#25090)zeertzjq2023-09-11
| |
* | test: unignore test which froze sourcehut (#25067)Sergey Slipchenko2023-09-11
| |
* | build: remove luarocksdundargoc2023-09-10
| | | | | | | | | | Luarocks is no longer needed after 25e51d393a420765d5efd44c1b4be823a5cf280a.
* | feat(lsp): improve control over placement of floating windows (#24494)Grace Petryk2023-09-10
| |
* | Merge pull request #25039 from glepnir/fix_hlbfredl2023-09-09
|\ \ | | | | | | fix(highlight): add create param in nvim_get_hl api function
| * | fix(highlight): add create param in nvim_get_hlglepnir2023-09-09
| |/
* | vim-patch:partial:9.0.1886: Various Typoszeertzjq2023-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Various Typos Solution: Fix Typos This is a collection of typo related commits. closes: vim/vim#12753 closes: vim/vim#13016 https://github.com/vim/vim/commit/ee17b6f70d382ec6c5d8d27b56c4e84106ac8c55 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl> Co-authored-by: Viktor Szépe <viktor@szepe.net> Co-authored-by: nuid64 <lvkuzvesov@proton.me> Co-authored-by: Meng Xiangzhuo <aumo@foxmail.com> Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com>
* | vim-patch:9.0.1877: missing test for patch 9.0.1873zeertzjq2023-09-09
|/ | | | | | | | | | | | Problem: missing test for patch 9.0.1873 Solution: add a test trying to exchange windows Add a test, making sure that switching windows is not allowed when textlock is active, e.g. when running `:s/<pat>/\=func()/` https://github.com/vim/vim/commit/18d2709aa12ffa3f6ae1a13059990558c5f8e406 Co-authored-by: Christian Brabandt <cb@256bit.org>
* refactor(map): enhanced implementation, Clean Code™, etc etcbfredl2023-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This involves two redesigns of the map.c implementations: 1. Change of macro style and code organization The old khash.h and map.c implementation used huge #define blocks with a lot of backslash line continuations. This instead uses the "implementation file" .c.h pattern. Such a file is meant to be included multiple times, with different macros set prior to inclusion as parameters. we already use this pattern e.g. for eval/typval_encode.c.h to implement different typval encoders reusing a similar structure. We can structure this code into two parts. one that only depends on key type and is enough to implement sets, and one which depends on both key and value to implement maps (as a wrapper around sets, with an added value[] array) 2. Separate the main hash buckets from the key / value arrays Change the hack buckets to only contain an index into separate key / value arrays This is a common pattern in modern, state of the art hashmap implementations. Even though this leads to one more allocated array, it is this often is a net reduction of memory consumption. Consider key+value consuming at least 12 bytes per pair. On average, we will have twice as many buckets per item. Thus old implementation: 2*12 = 24 bytes per item New implementation 1*12 + 2*4 = 20 bytes per item And the difference gets bigger with larger items. One might think we have pulled a fast one here, as wouldn't the average size of the new key/value arrays be 1.5 slots per items due to amortized grows? But remember, these arrays are fully dense, and thus the accessed memory, measured in _cache lines_, the unit which actually matters, will be the fully used memory but just rounded up to the nearest cache line boundary. This has some other interesting properties, such as an insert-only set/map will be fully ordered by insert only. Preserving this ordering in face of deletions is more tricky tho. As we currently don't use ordered maps, the "delete" operation maintains compactness of the item arrays in the simplest way by breaking the ordering. It would be possible to implement an order-preserving delete although at some cost, like allowing the items array to become non-dense until the next rehash. Finally, in face of these two major changes, all code used in khash.h has been integrated into map.c and friends. Given the heavy edits it makes no sense to "layer" the code into a vendored and a wrapper part. Rather, the layered cake follows the specialization depth: code shared for all maps, code specialized to a key type (and its equivalence relation), and finally code specialized to value+key type.
* refactor(build): derocksify luacheckbfredl2023-09-07
|
* feat(lsp): add original LSP Location as item's user_data in ↵Tom Praschan2023-09-07
| | | | locations_to_items (#23743)
* fix(diagnostic): always return copies of diagnostic items (#25010)Evgeni Chasnovski2023-09-06
|
* vim-patch:9.0.1874: CI may fail in test_recover_empty_swapzeertzjq2023-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: CI may fail in test_recover_empty_swap Solution: Set directory option Fix failing Test_recover_empty_swap test :recover by default not only looks in the current directory, but also in ~/tmp for files to recover. If it finds some files to recover, it will interactively prompt for a file to recover. However, prompting doesn't work when running the test suite (and even if it would, there is no one that can answer the prompt). So it doesn't really make sense during testing, to inspect different directories for swap files and prompt and wait (which will lead to a timeout and therefore a failing test). So set the 'directory' option temporarily to the current directory only and reset it back once the test finishes. closes: vim/vim#13038 https://github.com/vim/vim/commit/1c7397f3f1e168541f88bb1bbd93a9f0b1235852 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:partial:9.0.0669: too many delete() calls in testszeertzjq2023-09-06
| | | | | | | | | | | | Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible. https://github.com/vim/vim/commit/db77cb3c08784e6038dd029271b2080c1b2d9acb Include test_recover.vim changes only. Cherry-pick test_recover.vim change from patch 8.2.3637. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test(old): reorder test_quickfix.vim to match upstream (#25029)zeertzjq2023-09-06
|
* Merge pull request #25006 from lewis6991/fix/systemkillLewis Russell2023-09-05
|\ | | | | `vim.system` fixes and improvements
| * refactor(vim.system): factor out on_exit handlingLewis Russell2023-09-05
| |
| * fix(vim.system): make timeout work properlyLewis Russell2023-09-05
| | | | | | | | Mimic the behaviour of timeout(1) from coreutils.
| * fix(vim.system): let on_exit handle cleanup after killLewis Russell2023-09-05
| | | | | | | | Fixes #25000
* | fix(options): correct condition for calling did_set_option() (#25026)zeertzjq2023-09-05
|/
* vim-patch:9.0.1866: undo is synced after character find (#25021)zeertzjq2023-09-05
| | | | | | | | | | | vim-patch:9.0.1866: undo is synced after character find Problem: Undo is synced after character find. Solution: Set no_u_sync when calling gotchars_nop(). closes: vim/vim#13022 closes: vim/vim#13024 https://github.com/vim/vim/commit/dccc29c228f8336ef7dd069a447886639af4458e