aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
| * | fix(test): fix "indeterminism" warnings in UI testsbfredl2023-09-20
| | |
* | | fix(mouse): click on empty line with 'foldcolumn'zeertzjq2023-09-21
| | |
* | | test(ui/float_spec): click in bordered float sets correct curswantzeertzjq2023-09-21
| | |
* | | vim-patch:9.0.1919: Wrong curswant when clicking on empty line or with vsplitszeertzjq2023-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Wrong curswant when clicking on empty line or with vsplits. Solution: Don't check for ScreenCols[] before the start of the window and handle empty line properly. closes: vim/vim#13132 https://github.com/vim/vim/commit/03cd697d635f1b0e7ffe21cf8244a8fb755f2ddb
* | | vim-patch:9.0.1921: not possible to use the jumplist like a stack (#25278)zeertzjq2023-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: not possible to use the jumplist like a stack Solution: Add the 'jumpoptions' setting to make the jumplist a stack. Add an option for using jumplist like tag stack related: vim/vim#7738 closes: vim/vim#13134 ported from NeoVim: - https://neovim.io/doc/user/motion.html#jumplist-stack - neovim/neovim@39094b3 - https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior Based on the feedback in the previous PR, it looks like many people like this option. https://github.com/vim/vim/commit/87018255e3ad0f4dfa03e20318836d24af721caf Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com> Co-authored-by: butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com>
* | | fix(statuscolumn): update number hl for each screen line (#25277)zeertzjq2023-09-21
| | |
* | | vim-patch:9.0.1918Christian Clason2023-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch 9.0.1918: No filetype detection for Authzed filetypes Problem: No filetype detection for Authzed filetypes Solution: Detect the *.zed file extension as authzed filetype closes: vim/vim#13129 https://github.com/vim/vim/commit/5790a54166793554d16f6a85d8824632860b8b37 Co-authored-by: Matt Polzin <mpolzin@workwithopal.com>
* | | fix(extmarks): account for rightleft when drawing virt text (#25262)Ibby2023-09-20
| | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | | fix(extmarks): fix win_col virt_text drawn on wrong screen line (#25264)zeertzjq2023-09-20
|/ /
* | Merge pull request #25096 from glepnir/float_winnewbfredl2023-09-20
|\ \ | | | | | | fix(float): trigger winnew event when float window create
| * | fix(float): trigger winnew event when float window createglepnir2023-09-19
| |/
* | Merge pull request #25155 from glepnir/fix_winhlbfredl2023-09-20
|\ \ | | | | | | fix(highlight): winhl receive wrong argument
| * | fix(highlight): winhl receive wrong argumentglepnir2023-09-19
| | |
* | | test(lsp): add normalize_markdown testsMaria José Solano2023-09-20
| | |
* | | vim-patch:9.0.1915: r_CTRL-C works differently in visual mode (#25248)zeertzjq2023-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: r_CTRL-C works differently in visual mode Solution: Make r_CTRL-C behave consistent in visual mode in terminal and Windows GUI in visual mode, r CTRL-C behaves strange in Unix like environments. It seems to end visual mode, but still is waiting for few more chars, however it never seems to replace it by any characters and eventually just returns back into normal mode. In contrast in Windows GUI mode, r_CTRL-C replaces in the selected area all characters by a literal CTRL-C. Not sure why it behaves like this. It seems in the Windows GUI, got_int is not set and therefore behaves as if any other normal character has been pressed. So remove the special casing of what happens when got_int is set and make it always behave like in Windows GUI mode. Add a test to verify it always behaves like replacing in the selected area each selected character by a literal CTRL-C. closes: vim/vim#13091 closes: vim/vim#13112 https://github.com/vim/vim/commit/476733f3d06876c7ac105e064108c973a57984d3 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | | feat(lsp): use treesitter for stylize markdownMaria José Solano2023-09-19
| | |
* | | fix(float): make "fixed" work with relative=win (#25243)zeertzjq2023-09-19
| | |
* | | Merge pull request #25214 from bfredl/glyphcachebfredl2023-09-19
|\ \ \ | | | | | | | | refactor(grid): change schar_T representation to be more compact
| * | | refactor(grid): change schar_T representation to be more compactbfredl2023-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, a screen cell would occupy 28+4=32 bytes per cell as we always made space for up to MAX_MCO+1 codepoints in a cell. As an example, even a pretty modest 50*80 screen would consume 50*80*2*32 = 256000, i e a quarter megabyte With the factor of two due to the TUI side buffer, and even more when using msg_grid and/or ext_multigrid. This instead stores a 4-byte union of either: - a valid UTF-8 sequence up to 4 bytes - an escape char which is invalid UTF-8 (0xFF) plus a 24-bit index to a glyph cache This avoids allocating space for huge composed glyphs _upfront_, while still keeping rendering such glyphs reasonably fast (1 hash table lookup + one plain index lookup). If the same large glyphs are using repeatedly on the screen, this is still a net reduction of memory/cache consumption. The only case which really gets worse is if you blast the screen full with crazy emojis and zalgo text and even this case only leads to 4 extra bytes per char. When only <= 4-byte glyphs are used, plus the 4-byte attribute code, i e 8 bytes in total there is a factor of four reduction of memory use. Memory which will be quite hot in cache as the screen buffer is scanned over in win_line() buffer text drawing A slight complication is that the representation depends on host byte order. I've tested this manually by compling and running this in qemu-s390x and it works fine. We might add a qemu based solution to CI at some point.
* | | | Merge pull request #25148 from glepnir/fixed_optbfredl2023-09-19
|\ \ \ \ | |/ / / |/| | | fix(float): add fixed option
| * | | fix(float): add fixd optionglepnir2023-09-18
| |/ /
* | | docs(test): add more info on debugging with gdb #25230Sergey Slipchenko2023-09-18
| | |
* | | test(tui_spec): update cursor_address test for wrap flag (#25228)zeertzjq2023-09-18
| | |
* | | test(ui/fold_spec): more testing for clicking on 'foldcolumn' (#25225)zeertzjq2023-09-18
| | |
* | | 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