aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'origin/colorcolchar' into 20231130_mixJosh Rahm2023-11-30
|\
| * Merge remote-tracking branch 'upstream/master' into colorcolcharcolorcolcharJosh Rahm2023-11-29
| |\
| * \ Merge remote-tracking branch 'upstream/master' into colorcolcharJosh Rahm2023-01-25
| |\ \
| * \ \ Merge remote-tracking branch 'upstream/master' into colorcolcharJosh Rahm2022-10-11
| |\ \ \
| * | | | feat(colorcolchar): revert "feat: rename colorcol in fillchars to colorc"Josh Rahm2022-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 234959abbfcf075cb09304b00fc391780580056d and renames the option 'colorc' -> 'colorcol' again.
| * | | | feat(colorcolchar): fix highlight_spec.luaJosh Rahm2022-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | Problem was interpreting a '|' as next command, causing vim to interpret set fillchars+=colorcol:| incorrectly
| * | | | feat(colorcolchar): rename colorcol in fillchars to colorcJosh Rahm2022-08-27
| | | | | | | | | | | | | | | | | | | | Rename the colorcol option in fillchars to the more terse colorc.
| * | | | feat(colorcolchar): add the option "colorcol" to the fillchars settingJosh Rahm2022-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option will let neovim draw a character in the colorcolumn when there is no other character occupying that spot. For example, I'm someone who likes the elegance of seeing a 1px wide line at the 80 character mark, rather than a rectangle the width of a cell at that mark. To accomplish this, I run :set colorcol=80 :set fillchars=colorcol:│ of course ':' and '.' are good ASCII alteratives.
* | | | | vim-patch:9.0.2137: Can't detect angular & mustache filetypesObserverOfTime2023-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Can't detect angular & mustache filetypes Solution: Detect *.mustache as Mustache filetype; detect *.component.html as html.angular filetype closes: vim/vim#13594 https://github.com/vim/vim/commit/7bed263c343c62129c5d8f51796895a28db1b312
* | | | | fix(tui): grow termkey's internal buffer for large escape sequences (#26309)Gregory Anders2023-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some escape sequences (in particular, OSC 52 paste responses) can be very large, even unbounded in length. These can easily overflow termkey's internal buffer. In order to process these long sequences, dynamically grow termkey's internal buffer.
* | | | | Merge pull request #23657 from luukvbaal/extmarkbfredl2023-11-30
|\ \ \ \ \ | | | | | | | | | | | | fix(extmark): restore extmarks when completing original text
| * | | | | fix(extmark): restore extmarks when completing original textLuuk van Baal2023-11-29
| | |_|_|/ | |/| | |
* | | | | test: unskip more terminal tests on Windows (#26315)zeertzjq2023-11-30
| | | | |
* | | | | test(ex_terminal_spec): match descriptions (#26314)zeertzjq2023-11-30
| | | | |
* | | | | test: :terminal when 'shell' uses backslasheszeertzjq2023-11-30
| | | | |
* | | | | test(ex_terminal_spec): unskip tests that work on Windows (#26310)zeertzjq2023-11-30
|/ / / /
* | | | refactor: move some constants out of vim_defs.h (#26298)zeertzjq2023-11-29
| | | |
* | | | perf(column): only invalidate lines affected by added signLuuk van Baal2023-11-29
| | | |
* | | | Merge pull request #26292 from luukvbaal/decorbfredl2023-11-29
|\ \ \ \ | | | | | | | | | | fix(decorations): do not apply sign highlight id as range attr id
| * | | | fix(decorations): do not apply sign highlight id as range attr idLuuk van Baal2023-11-29
| | | | |
* | | | | vim-patch:9.0.2134: ml_get error when scrolling (#26264)zeertzjq2023-11-29
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ml_get error when scrolling after delete Solution: mark topline to be validated in main_loop if it is larger than current buffers line count reset_lnums() is called after e.g. TextChanged autocommands and it may accidentally cause curwin->w_topline to become invalid, e.g. if the autocommand has deleted some lines. So verify that curwin->w_topline points to a valid line and if not, mark the window to have w_topline recalculated in main_loop() in update_topline() after reset_lnums() returns. fixes: vim/vim#13568 fixes: vim/vim#13578 https://github.com/vim/vim/commit/c4ffeddfe5bd1824650e9b911ed9245bf56c69e3 The error doesn't happen in Nvim because Nvim triggers TextChanged after calling update_topline(). Co-authored-by: Christian Brabandt <cb@256bit.org>
* | | | vim-patch:9.0.2135: No test for mode() when executing Ex commands (#26282)zeertzjq2023-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No test for mode() when executing Ex commands Solution: Add some test cases and simplify several other test cases. Also add a few more test cases for ModeChanged. closes: vim/vim#13588 https://github.com/vim/vim/commit/fcaeb3d42b228e73c669b2fce78f1d3fe112769f
* | | | refactor: fix headers with IWYUdundargoc2023-11-28
| | | |
* | | | fix(column): redraw and update signcols for paired extmarkLuuk van Baal2023-11-28
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Signcolumn width does not increase when ranged sign does not start at sentinel line. Solution: Handle paired range of added sign when checking signcols.
* | | | Merge pull request #26249 from bfredl/concealcharbfredl2023-11-28
|\ \ \ \ | | | | | | | | | | feat(decoration): allow conceal_char to be a composing char
| * | | | feat(decoration): allow conceal_char to be a composing charbfredl2023-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | decor->text.str pointer must go. This removes it for conceal char, in preparation for a larger PR which will also handle the sign case. By actually allowing composing chars for a conceal chars, this becomes a feature and not just a refactor, as a bonus.
* | | | | vim-patch:9.0.2133: Cannot detect overstrike mode in Cmdline mode (#26263)zeertzjq2023-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot detect overstrike mode in Cmdline mode Solution: Make mode() return "cr" for overstrike closes: vim/vim#13569 https://github.com/vim/vim/commit/d1c3ef1f47c87d1da056c56564e1985fe6f2931d
* | | | | vim-patch:9.0.2131: not all nushell files detected (#26260)Christian Clason2023-11-28
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: not all nushell files detected Solution: use *.nu to detect nushell files closes: vim/vim#13586 https://github.com/vim/vim/commit/b9efc72c2432f2d2a633c12d3a5b9fc3efb7b6e7 Co-authored-by: Daniel Buch Hansen <boogiewasthere@gmail.com>
* | | | fix(treesitter): don't invalidate parser when discovering injectionsDmytro Soltys2023-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing with a range, languagetree looks up injections and adds them if needed. This explicitly invalidates parser, making `is_valid` report `false` both when including and excluding children. This is an attempt to describe desired behaviour of `is_valid` in tests, with what ended up being a single line change to satisfy them.
* | | | test: check vim.wait() error message in fast context (#26242)zeertzjq2023-11-27
| | | |
* | | | fix(lua): disallow vim.wait() in fast contextsLewis Russell2023-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `vim.wait()` cannot be called in a fast callback since the main loop cannot be run in that context as it is not reentrant Fixes #26122
* | | | vim-patch:9.0.2128: runtime(swig): add syntax and filetype pluginsChristian Clason2023-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add syntax and filetype plugins for SWIG (Simplified Wrapper Interface Generator) description files. The default syntax for .i files highlights comments in a reverse color scheme which doesn't look well. This syntax builds on vim's c++ syntax by adding highlighting for common swig directives and user defined directives. For an alternative syntax, see vimscript vim/vim#1247 (which I found after writing this). closes: vim/vim#13562 https://github.com/vim/vim/commit/2e31065a650015892179e520038bf2083a9519b6 Co-authored-by: Julien Marrec <julien.marrec@gmail.com> Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
* | | | Merge pull request #26203 from jamessan/swapfile-test-fixJames McCoy2023-11-25
|\ \ \ \ | | | | | | | | | | fix(oldtest): always use a 64-bit int for swapfile block number
| * | | | fix(oldtest): always use a 64-bit int for swapfile block numberJames McCoy2023-11-24
| | | | | | | | | | | | | | | | | | | | 09d4133 changed blocknr_T from long to int64_t, so pe_bnum is now always 64-bit. This was an incompatible change in the swapfile format for 32-bit systems, but there have been no complaints in the past 9 years so just adjust the test.
* | | | | fix(mouse): avoid dragging when clicking next to popupmenu (#26201)luukvbaal2023-11-25
|/ / / /
* | | | fix(messages): validate msg_grid before using msg_grid_pos (#26189)zeertzjq2023-11-24
| | | |
* | | | fix(mouse): avoid dragging after click label popupmenu callback (#26187)luukvbaal2023-11-24
| | | |
* | | | vim-patch:9.0.2126: unused assignments when checking 'listchars' (#26182)zeertzjq2023-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Unused assignments when checking the value of 'listchars'. Solution: Loop only once when just checking the value. Add a test to check that this change doesn't cause double-free. closes: vim/vim#13559 https://github.com/vim/vim/commit/00624a2fa08d04bdded240d474e9cfdc193dbe10
* | | | vim-patch:9.0.2125: File info disappears when 'cmdheight' has decreased (#26180)zeertzjq2023-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: File info disappears immediately when 'cmdheight' has just decreased due to switching tabpage and 'shortmess' doesn't contain 'o' or 'O'. Solution: Make sure msg_row isn't smaller than cmdline_row. fixes: vim/vim#13560 closes: vim/vim#13561 https://github.com/vim/vim/commit/40ed6711bd385051021691980e8ce16375b4b510
* | | | fix(column): reset decor state before starting from topLuuk van Baal2023-11-23
| | | |
* | | | test: remove the pipe created by new_pipename() (#26173)zeertzjq2023-11-23
| | | |
* | | | fix(column): apply numhl signs when 'signcolumn' is "no" (#26167)luukvbaal2023-11-23
| | | |
* | | | vim-patch:9.0.2121: [security]: use-after-free in ex_substitutezeertzjq2023-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security]: use-after-free in ex_substitute Solution: always allocate memory closes: vim/vim#13552 A recursive :substitute command could cause a heap-use-after free in Vim (CVE-2023-48706). The whole reproducible test is a bit tricky, I can only reproduce this reliably when no previous substitution command has been used yet (which is the reason, the test needs to run as first one in the test_substitute.vim file) and as a combination of the `:~` command together with a :s command that contains the special substitution atom `~\=` which will make use of a sub-replace special atom and calls a vim script function. There was a comment in the existing :s code, that already makes the `sub` variable allocate memory so that a recursive :s call won't be able to cause any issues here, so this was known as a potential problem already. But for the current test-case that one does not work, because the substitution does not start with `\=` but with `~\=` (and since there does not yet exist a previous substitution atom, Vim will simply increment the `sub` pointer (which then was not allocated dynamically) and later one happily use a sub-replace special expression (which could then free the `sub` var). The following commit fixes this, by making the sub var always using allocated memory, which also means we need to free the pointer whenever we leave the function. Since sub is now always an allocated variable, we also do no longer need the sub_copy variable anymore, since this one was used to indicated when sub pointed to allocated memory (and had therefore to be freed on exit) and when not. Github Security Advisory: https://github.com/vim/vim/security/advisories/GHSA-c8qm-x72m-q53q https://github.com/vim/vim/commit/26c11c56888d01e298cd8044caf860f3c26f57bb Co-authored-by: Christian Brabandt <cb@256bit.org>
* | | | feat(extmarks): add sign name to extmark "details" arrayLuuk van Baal2023-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Unable to identify legacy signs when fetching extmarks with `nvim_buf_get_extmarks()`. Solution: Add "sign_name" to the extmark detail array. Add some misc. changes as follow-up to #25724
* | | | fix(decorations): fix imbalanced sign countbfredl2023-11-22
| | | |
* | | | refactor(decorations): break up Decoration struct into smaller piecesbfredl2023-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the monolithic Decoration struct. Before this change, each extmark could either represent just a hl_id + priority value as a inline decoration, or it would take a pointer to this monolitic 112 byte struct which has to be allocated. This change separates the decorations into two pieces: DecorSignHighlight for signs, highlights and simple set-flag decorations (like spell, ui-watched), and DecorVirtText for virtual text and lines. The main separation here is whether they are expected to allocate more memory. Currently this is not really true as sign text has to be an allocated string, but the plan is to get rid of this eventually (it can just be an array of two schar_T:s). Further refactors are expected to improve the representation of each decoration kind individually. The goal of this particular PR is to get things started by cutting the Gordian knot which was the monolithic struct Decoration. Now, each extmark can either contain chained indicies/pointers to these kinds of objects, or it can fit a subset of DecorSignHighlight inline. The point of this change is not only to make decorations smaller in memory. In fact, the main motivation is to later allow them to grow _larger_, but on a dynamic, on demand fashion. As a simple example, it would be possible to augment highlights to take a list of multiple `hl_group`:s, which then would trivially map to a chain of multiple DecorSignHighlight entries. One small feature improvement included with this refactor itself, is that the restriction that extmarks cannot be removed inside a decoration provider has been lifted. These are instead safely lifetime extended on a "to free" list until the current iteration of screen drawing is done. NB: flags is a mess. but DecorLevel is useless, this slightly less so
* | | | fix(messages): :map output with ext_messages (#26126)Bara C. Tudor2023-11-22
| | | |
* | | | fix(vim.region): handle multibyte inclusive selection properly (#26129)zeertzjq2023-11-21
| | | |
* | | | vim-patch:9.0.2116: No test for defining sign without attribute (#26115)luukvbaal2023-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No test for defining sign without attribute Solution: Add test for defining sign without attributes closes: vim/vim#13544 https://github.com/vim/vim/commit/e670d17342ea05af253b0452afb980397fa143be
* | | | test: skip failing watch file tests on freebsd (#26110)Mathias Fußenegger2023-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quick fix as follow up to https://github.com/neovim/neovim/pull/26108 kqueue only reports events on a watched folder itself, not for files created or deleted within. So the approach the PR took doesn't work on FreeBSD. We'll either need to bring back polling for it, combine watching with manual file tracking, or disable LSP file watching on FreeBSD