aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | refactor: remove 'shortmess' save/restore panic for ex commandsbfredl2023-09-25
| | | | | | | | | | | | This was only used to avoid the effect of SHM_OVERALL. This can easily be handled in isolation, instead of clearing out all of 'shortmess' which has unwanted side effects and mystifies what really is going on.
* | fix(api): handle NUL in nvim_err_write() and nvim_out_write() (#25354)zeertzjq2023-09-25
| |
* | fix(exception): remember whether message is multiline (#25351)zeertzjq2023-09-25
| |
* | vim-patch:9.0.1938: multispace wrong when scrolling horizontally (#25348)zeertzjq2023-09-25
| | | | | | | | | | | | | | | | | | | | Problem: multispace wrong when scrolling horizontally Solution: Update position in "multispace" or "leadmultispace" also in skipped chars. Reorder conditions to be more consistent. closes: vim/vim#13145 closes: vim/vim#13147 https://github.com/vim/vim/commit/abc808112ee5df58a9f612f2bb5a65389c2c14e1
* | vim-patch:9.0.1937: missing test for mouse click + 'virtedit' (#25347)zeertzjq2023-09-25
| | | | | | | | | | | | | | | | | | Problem: missing test for mouse click + 'virtedit' Solution: Add test for clicking after eol with 'virtualedit' and wrapped line closes: vim/vim#13157 https://github.com/vim/vim/commit/46a0582ffa4ea79b112ac01e25adccf93b49cd9d
* | vim-patch:9.0.1934: :bwipe fails after switching window from aucmd_win.zeertzjq2023-09-25
| | | | | | | | | | | | | | | | | | Problem: :bwipe fails after switching window from aucmd_win. Solution: Decrement b_nwindows after switching back to aucmd_win. closes: vim/vim#13160 https://github.com/vim/vim/commit/46bdae036ac4121e305fc3ed4ef3f9fc928dcb25
* | vim-patch:9.0.1931: make test_compilers fails on ubuntuzeertzjq2023-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: make test_compilers fails on ubuntu Solution: set LC_ALL=C fix: make test_compiler failed on xubuntu 22.04.3 Problem: 'make test_compiler' failed on Linux xubuntu 22.04.3 but succeeded on e.g. macOS. To reproduce: ``` $ ./configure --with-features=huge --enable-gui=no --enable-perlinterp=yes $ make -j12 $ cd vim/src/testdir $ make test_compiler ...snip... Found errors in Test_compiler(): command line..script /home/dope/sb/vim/src/testdir/runtest.vim[601]..function RunTheTest[54]..Test_compiler line 24: command did not fail: clist command line..script /home/dope/sb/vim/src/testdir/runtest.vim[601]..function RunTheTest[54]..Test_compiler line 30: Pattern '\\n \\d\\+ Xfoo.pl:3: Global symbol "$foo" requires explicit package name' does not match '\n19 Xfoo.pl:3: Global symbol "$foo" requires explicit package name (did you forget to declare "my $foo"?)' make: *** [Makefile:70: test_compiler] Error 1 ``` Solution: set `LC_ALL` to "C" in `Test_compiler()` closes: vim/vim#13173 https://github.com/vim/vim/commit/ca0ffc0d63727850c520a80929698e4c199b17f4 Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
* | fix(ui): "resize -1" with cmdheight=0 #24758nwounkn2023-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Crash from: set cmdheight=0 redrawdebug=invalid resize -1 Solution: Do not invalidate first `p_ch` `msg_grid` rows in `update_screen` when scrolling the screen down after displaying a message, because they may be used later for drawing cmdline. Fixes #22154
* | test: only trim trailing spaces in swapfile tests (#25341)zeertzjq2023-09-24
| |
* | fix(startup): stop TUI properly when quitting at swap dialog (#25337)zeertzjq2023-09-24
| |
* | test(old): don't set options to default before every test (#25335)zeertzjq2023-09-24
| | | | | | | | | | | | | | | | Oldtests clean up after themselves, and the options that need operators to align with Vim all deny duplicates, so there is no need to set them to default. Also make the variable name that test_listchars.vim uses to align with Vim more obvious.
* | fix(api, lua): handle setting v: variables properly (#25325)zeertzjq2023-09-24
| |
* | fix(ui): always use stl/stlnc fillchars when drawing statusline (#25267)tj-moody2023-09-24
| |
* | test(tui_spec): small consistency fixes (#25332)zeertzjq2023-09-24
| | | | | | | | | | - Make indent consistent. - Remove outdated "Only single integration test" comment. - Don't use setup() as function name as it's used by busted.
* | fix(float): fix some other crashes with :unhide or :all (#25328)zeertzjq2023-09-23
| |
* | fix(lua): show error message when failing to set variable (#25321)zeertzjq2023-09-23
| |
* | fix(unhide): close floating windows first (#25318)zeertzjq2023-09-23
| |
* | vim-patch:8.2.4609: :unhide does not check for failing to close a window ↵zeertzjq2023-09-23
| | | | | | | | | | | | | | | | | | | | | | (#25317) Problem: :unhide does not check for failing to close a window. Solution: When closing a window fails continue with the next one. Do not try closing the autocmd window. (closes vim/vim#9984) https://github.com/vim/vim/commit/6f2465d336a9d4afe392db4084ef7e9db17e67c1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | fix(tui): make :cquit work properly with remote TUI (#25313)zeertzjq2023-09-23
| |
* | fix(languagetree): don't treat unparsed nodes as occupying full rangeL Lllvvuu2023-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is incorrect in the following scenario: 1. The language tree is Lua > Vim > Lua. 2. An edit simultaneously wipes out the `_regions` of all nodes, while taking the Vim injection off-screen. 3. The Vim injection is not re-parsed, so the child Lua `_regions` is still `nil`. 4. The child Lua is assumed, incorrectly, to occupy the whole document. 5. This causes the injections to be parsed again, resulting in Lua > Vim > Lua > Vim. 6. Now, by the same process, Vim ends up with its range assumed over the whole document. Now the parse is broken and results in broken highlighting and poor performance. It should be fine to instead treat an unparsed node as occupying nothing (i.e. effectively non-existent). Since, either: - The parent was just parsed, hence defining `_regions` - The parent was not just parsed, in which case this node doesn't need to be parsed either. Also, the name `has_regions` is confusing; it seems to simply mean the opposite of "root" or "full_document". However, this PR does not touch it.
* | fix(api): get virtual text with multiple hl properly (#25307)zeertzjq2023-09-22
| |
* | fix(ui): handle virtual text with multiple hl in more cases (#25304)zeertzjq2023-09-22
| |
* | fix(extmarks): inline virt_text support multiple hl groups (#25303)zeertzjq2023-09-22
| |
* | vim-patch:9.0.1923: curswant wrong on click with 've' and 'nowrap' set (#25293)zeertzjq2023-09-22
| | | | | | | | | | | | | | | | Problem: curswant wrong on click with 've' and 'nowrap' set Solution: Add w_leftcol to mouse click column. closes: vim/vim#13142 https://github.com/vim/vim/commit/db54e989b5cff3cc6442dfc500e3962cc1c0b6d0
* | fix(lsp): handle absence of a trailing newline #25194Sergey Slipchenko2023-09-21
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #24339 rust-analyzer sends "Invalid offset" error in such cases. Some other servers handle it specially. LSP spec mentions that "A range is comparable to a selection in an editor". Most editors don't handle trailing newlines the same way Neovim/Vim does, it's clearly visible if it's present or not. With that in mind it's understandable why sending end position as simply the start of the line after the last one is considered invalid in such cases.
* | Merge pull request #25270 from bfredl/indeterminismbfredl2023-09-21
|\ \ | | | | | | fix(test): fix "indeterminism" warnings in UI tests
| * | 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
| | |