aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* feat(treesitter): add metadata option for get_node_textfigsoda2023-02-04
|
* feat(treesitter): allow capture text to be transformedfigsoda2023-02-04
| | | | Co-authored-by: Lewis Russell <lewis6991@gmail.com>
* vim-patch:9.0.1279: display shows lines scrolled down erroneously (#22126)zeertzjq2023-02-05
| | | | | | | | Problem: Display shows lines scrolled down erroneously. (Yishai Lerner) Solution: Do not change "wl_lnum" at index zero. (closes vim/vim#11938) https://github.com/vim/vim/commit/61fdbfa1e3c842252b701aec12f45839ca41ece5 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* Merge pull request #21331 from LiadOz/LiadOz/prompt-insert-extmarkbfredl2023-02-02
|\ | | | | fix(extmarks): adjust extmarks when inserting prompt prefix
| * fix(extmarks): adjust extmarks when inserting prompt prefixLiad Oz2023-01-14
| |
* | fix(column): estimate 'statuscolumn' width appropriatelyluukvbaal2023-02-02
| | | | | | | | | | | | | | | | | | | | | | Problem: The 'statuscolumn' width is being estimated without the proper context. In particular, this resulted in the fact that a custom fold column could be included in the estimated `number_width()`, and doubly added when actually drawing the statuscolumn due to `win_col_off()` also adding the `'foldcolumn'` width. Resulting in a status column that is `'foldcolumn'` cells wider than necessary. Solution: Estimate 'statuscolumn' width in `get_statuscol_str()` when a buffer's line count has changed.
* | fix(exit): skip unnecessary steps in TUI preserve_exit() (#21897)zeertzjq2023-02-02
| | | | | | | | This prevents the TUI from doing unexpected things when receiving a deadly signal or running out of memory.
* | fix(man): use italics for `<bs>_` (#22086)Lewis Russell2023-02-01
| | | | | | | | | | | | | | | | | | | | | | | | fix(man): use italics for <bs>_ Even though underline is strictly what this should be. <bs>_ was used by nroff to indicate italics which wasn't possible on old typewriters so underline was used. Modern terminals now support italics so lets use that now. See: - https://unix.stackexchange.com/questions/274658/purpose-of-ascii-text-with-overstriking-file-format/274795#274795 - https://cmd.inp.nsk.su/old/cmd2/manuals/unix/UNIX_Unleashed/ch08.htm
* | Merge pull request #17537 from bfredl/neoluabfredl2023-01-31
|\ \ | | | | | | refactor(tests): run unittests using main nvim binary - delete separate nvim-test build
| * | refactor(tests): run unittests using main nvim binary in interpreter modebfredl2023-01-31
| | | | | | | | | | | | This allows us to get rid of the separate "nvim-test" target
| * | fix(test): fix issues detected by running unittests in ASAN/UBSANbfredl2023-01-31
| | |
* | | Merge pull request #22005 from clason/sanitize-langChristian Clason2023-01-31
|\ \ \ | |/ / |/| | fix(treesitter): validate language name
| * | fix(treesitter): validate language nameChristian Clason2023-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Some injections (like markdown) allow specifying arbitrary language names for code blocks, which may be lead to errors when looking for a corresponding parser in runtime path. Solution: Validate that the language name only contains alphanumeric characters and `_` (e.g., for `c_sharp`) and error otherwise.
* | | fix(tests): use -l mode for lsp testsbfredl2023-01-31
| | | | | | | | | | | | | | | This fixes "fake server" from leaking memory, which makes ASAN very upset, except on current ASAN CI for some reason.
* | | fix(highlight): properly deal with underline mask when listing (#22057)zeertzjq2023-01-31
|/ /
* | test: exepath() returns correct path with cmd.exe, powershell #21928Anton Kriese2023-01-26
| | | | | | | | | | | | | | | | | | | | test(exepath): test if exepath returns correct path with multiple Windows shells This test covers the changes from #21175 where exepath() is set to prefer file extensions in powershell.exe aswell as in cmd.exe. In both shells, the file with a valid extension should be returned instead of the extensionless file.
* | test: add test for :runtime completion for .luazeertzjq2023-01-26
| |
* | feat(highlight): define the concept of altfont as a (c)term rendering attributePaul "LeoNerd" Evans2023-01-24
| |
* | refactor(highlight): reshape the HL_UNDER* bits into a 3-bit integer maskPaul "LeoNerd" Evans2023-01-24
| | | | | | | | Saves two bits for reuse for new features
* | revert: "refactor(win_close): remove "force", don't pass on "free_buf" ↵zeertzjq2023-01-24
| | | | | | | | | | | | | | | | (#21921)" (#21979) This reverts commit 0371d0f7afa5e01dd2ac8bbd3abcf0f7454872b3. > 'bufhidden' option exists. I don't think we should assume autoclosing windows are fine just because 'hidden' is set.
* | fix(api): don't allow hiding aucmd_win from another tabpage (#21975)zeertzjq2023-01-24
| |
* | fix(lsp): check method is supported when range formatting (#21970)Sean Dewar2023-01-24
| | | | | | | | | | | | `vim.lsp.buf.format()` silently did nothing if no servers supported `textDocument/rangeFormatting` when formatting with a range. Issue found by `@hwrd:matrix.org` in the Matrix chat.
* | build: remove unnecessary unit test code (#21940)dundargoc2023-01-24
| | | | | | | | | | | | The files generated by test/includes/CMakeLists.txt have been unused since commit c49e22d396. The unittests include the headers in test/includes directly without any processing, meaning that the CMakeLists.txt file is no longer necessary.
* | revert: "shada/context: fully remove jumplist duplicates #10898" (#21874)zeertzjq2023-01-23
| | | | | | | | | | This reverts commit 8b8ecf44f2cda43bbd710ec22ef99439b71888cd. It is causing performance problems on exit. Fix #21082.
* | refactor(win_close): remove "force", don't pass on "free_buf" (#21921)zeertzjq2023-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The "force" flag of win_close() complicates the code and adds edge cases where it is not clear what the correct behavior should be. The "free_buf" flag of win_close() is passed on to float windows when closing the last window of a tabpage, which doesn't make much sense. Solution: Remove the "force" flag and always close float windows as if :close! is used when closing the last window of a tabpage, and set the "free_buf" flag for a float window based on whether its buffer can be freed. As 'hidden' is on by default, this change shouldn't affect many people.
* | build: make generated source files reproducible #21586Arnout Engelen2023-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Build is not reproducible, because generated source files (.c/.h/) are not deterministic, mostly because Lua pairs() is unordered by design (for security). https://github.com/LuaJIT/LuaJIT/issues/626#issuecomment-707005671 https://www.lua.org/manual/5.1/manual.html#pdf-next > The order in which the indices are enumerated is not specified [...] > >> The hardening of the VM deliberately randomizes string hashes. This in >> turn randomizes the iteration order of tables with string keys. Solution: - Update the code generation scripts to be deterministic. - That is only a partial solution: the exported function (funcs_metadata.generated.h) and ui event (ui_events_metadata.generated.h) metadata have some mpack'ed tables, which are not serialized deterministically. - As a workaround, introduce `PRG_GEN_LUA` cmake setting, so you can inject a modified build of luajit (with LUAJIT_SECURITY_PRN=0) that preserves table order. - Longer-term we should change the mpack'ed data structure so it no longer uses tables keyed by strings. Closes #20124 Co-Authored-By: dundargoc <gocdundar@gmail.com> Co-Authored-By: Arnout Engelen <arnout@bzzt.net>
* | fix(extmarks): problems with folded virtual lines (#21930)luukvbaal2023-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When a folded line has virtual lines attached, the following problems occur: - The virtual lines are drawn empty. - The 'foldtext' line is drawn empty. - The cursor is drawn incorrectly. Solution: Check whether virtual lines belong to a folded line. Fix #17027 Fix #19557 Fix #21837 Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | feat(treesitter): show filetype associated with parser (#17633)Matthieu Coudron2023-01-22
| | | | | | to ease debug. At one point I had an empty filetype and the current message was not helpful enough
* | fix(completion): include lua syntaxes in :ownsyntax completion (#21941)zeertzjq2023-01-22
| | | | | | | | This just removes DIP_LUA and always executes its branches. Also add tests for cmdline completion for other lua runtime files.
* | vim-patch:8.2.0382: some tests fail when run under valgrind (#21936)zeertzjq2023-01-21
| | | | | | | | | | | | | | | | | | | | Problem: Some tests fail when run under valgrind. Solution: Increase timeouts. https://github.com/vim/vim/commit/353c351bd22e4dac4c3ae9cd7731032348f248c4 Cherry-pick Test_pum_with_preview_win() from patch 8.2.0011. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | fix(remote): don't leak memory on failure to connect to server (#21931)zeertzjq2023-01-21
| | | | | | Also fix the race between output and resize in the test for this.
* | test(tui_spec): don't expect exact screen in rapid resize test (#21935)zeertzjq2023-01-21
| | | | | | | | There may be a race between resizes, so don't expect exact screen. Expect window width instead.
* | test(tui_spec): make rapid resize test test what it wants to test (#21933)zeertzjq2023-01-21
| | | | | | | | | | Actually execute the command. Don't use assert_alive() as it checks the host session instead of the child session. Use screen:expect() instead.
* | test(syn_attr_spec): add more information (#21912)zeertzjq2023-01-20
| | | | | | This makes it clear on test failure what the attributes are.
* | perf(statuscolumn): only fill click defs array once per redraw (#21884)luukvbaal2023-01-20
| | | | | | | | | | | | | | | | | | | | | | Problem: 'statuscolumn' click definitions are cleared, evaluated, allocated and filled each redraw for every row in a window. This despite the fact that we only store a single click definition array for the entire column as opposed to one for each row. Solution: Only fill the 'statuscolumn' click definition array once per window per redraw. Resolve https://github.com/neovim/neovim/issues/21767.
* | vim-patch:8.2.4655: cmdline completion popup menu positioned wrong (#21894)zeertzjq2023-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Command line completion popup menu positioned wrong when using a terminal window. Solution: Position the popup menu differently when editing the command line. (Yegappan Lakshmanan, closes vim/vim#10050, closes vim/vim#10035) https://github.com/vim/vim/commit/1104a6d0c2004d39e9b6cb8f804d12b628a69869 The test in the patch looks a bit hard to understand. Add a Lua test that is more straightforward. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | fix(statusline): don't leak memory with truncated click labelszeertzjq2023-01-19
| |
* | fix(statusline): don't leak memory with zero-width click labelszeertzjq2023-01-19
| | | | | | | | | | A zero-width click label isn't assigned to any click definition, so its function name should be freed when filling click definitions.
* | vim-patch:8.2.1698: cannot lock a variable in legacy Vim script like in Vim9 ↵zeertzjq2023-01-19
| | | | | | | | | | | | | | | | | | | | (#21883) Problem: Cannot lock a variable in legacy Vim script like in Vim9. Solution: Make ":lockvar 0" work. https://github.com/vim/vim/commit/a187c43cfe8863d48b2159d695fedcb71f8525c1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | Merge pull request #21881 from bfredl/uniterrorbfredl2023-01-18
|\ \ | | | | | | fix(unittests): do not consider process crash to be a success
| * | fix(unittests): fix TUI broken test previously ignoredbfredl2023-01-18
| | |
| * | fix(unittest): delete unused duplicated codebfredl2023-01-18
| | | | | | | | | | | | YAGNI. These were disabled 5 years ago in lint commit 29ed5b3a39abb84d6af602b2d0a7680d9dab381c
| * | fix(unittests): do not consider process crash to be a successbfredl2023-01-18
| | | | | | | | | | | | | | | | | | | | | | | | unittests relied on the exact setup of coredumps on CI to detect process crashing, and otherwise completely discarded errors. Dectect child process failure reliably using process status, so that unittests actually work locally as well.
* | | fix(statuscolumn): always fill click defs array (#21878)zeertzjq2023-01-18
|/ / | | | | | | | | | | | | | | Click definitions are always filled for tabline, statusline and winbar, so they should also be always filled for statuscolumn, otherwise it will leak memory. Note: this doesn't actually change the existing code much, because of a typo in the existing code.
* | fix(completion): correct what modes support fuzzy completionzeertzjq2023-01-17
| |
* | fix(tabline): avoid memory leak in tabline click definitions (#21847)luukvbaal2023-01-17
| | | | | | | | | | | | Problem: Memory is leaked in tabline click definitions since https://github.com/neovim/neovim/pull/21008. Solution: Add back a call to `stl_clear_click_defs()` that was lost in the refactor PR.
* | fix: failing XDG test on Windows CIJustin M. Keyes2023-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Failing Windows CI: FAILED test/functional\options\defaults_spec.lua @ 361: XDG defaults with too long XDG variables are correctly set test\helpers.lua:134: Pattern "Failed to start server: no such file or directory: /X/X/X" not found in log (last 10 lines): Xtest-defaults-log: FAILED test/functional\options\defaults_spec.lua @ 435: XDG defaults with XDG variables that can be expanded are not expanded test\helpers.lua:134: Pattern "Failed to start server: no such file or directory: %$XDG_RUNTIME_DIR%/" not found in log (last 10 lines): Xtest-defaults-log: Solution: The assert_log() statements are not relevant on Windows, because there XDG_RUNTIME_DIR is not used for creating servers, it uses \\.pipe\….
* | test(statuscolumn): %l should follow default wrap behavior (#21766)Brian Koropoff2023-01-17
| |
* | Merge #21844 test: avoid noise in test logsJustin M. Keyes2023-01-16
|\ \
| * | refactor(tests): lift retry() into assert_log()Justin M. Keyes2023-01-17
| | |