aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* 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
| |
| * test: avoid noise in NVIM_LOG_FILEJustin M. Keyes2023-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Tests that _intentionally_ fail certain conditions cause noise in $NVIM_LOG_FILE: $NVIM_LOG_FILE: /home/runner/work/neovim/neovim/build/.nvimlog (last 100 lines) WRN 2023-01-16T18:26:27.673 T599.7799.0 unsubscribe:519: RPC: ch 1: tried to unsubscribe unknown event 'doesnotexist' WRN 2023-01-16T18:29:00.557 ?.11151 server_start:163: Failed to start server: no such file or directory: /X/X/X/... WRN 2023-01-16T18:33:07.269 127.0.0.1:12345 server_start:163: Failed to start server: address already in use: 127.0.0.1 ... -- Output to stderr: module 'vim.shared' not found: no field package.preload['vim.shared'] no file './vim/shared.lua' no file '/home/runner/nvim-deps/usr/share/lua/5.1/vim/shared.lua' no file '/home/runner/nvim-deps/usr/share/lua/5.1/vim/shared/init.lua' no file '/home/runner/nvim-deps/usr/lib/lua/5.1/vim/shared.lua' no file '/home/runner/nvim-deps/usr/lib/lua/5.1/vim/shared/init.lua' no file './vim/shared.so' ... E970: Failed to initialize builtin lua modules Solution: - Log to a private $NVIM_LOG_FILE in tests that intentionally fail and cause ERR log messages. - Assert that the expected messages are actually logged.
* | fix(api): avoid memory leak with click functions in nvim_eval_statusline() ↵luukvbaal2023-01-17
|/ | | | | | | | | (#21845) Problem: Allocated click function memory is lost due to `nvim_eval_statusline()` not passing in a `StlClickRecord`. Solution: Do not allocate click function memory if `tabtab == NULL`. Resolve #21764, supersede #21842.
* Merge pull request #21768 from luukvbaal/test-virtlinezeertzjq2023-01-17
|\ | | | | | | | | | | | | | | fix(column)!: ensure 'statuscolumn' works with virtual and wrapped lines BREAKING CHANGE: In 'statuscolumn' evaluation, `v:wrap` has been replaced by `v:virtnum`. `v:virtnum` is negative when drawing virtual lines, zero when drawing the actual buffer line, and positive when drawing the wrapped part of a buffer line.
| * fix(column): avoid drawing columns for virt_lines_leftcolLuuk van Baal2023-01-16
| | | | | | | | | | | | | | | | Problem: The default fold column, as well as the 'statuscolumn', were drawn unnecessarily/unexpectedly for virtual lines placed with `virt_lines_leftcol` set. Solution: Skip the column states if a virtual line with `virt_lines_leftcol` set will be drawn.
| * fix(column)!: ensure 'statuscolumn' works with virtual and wrapped linesLuuk van Baal2023-01-16
| | | | | | | | | | | | | | | | | | | | Problem: The `'statuscolumn'` was not re-evaluated for wrapped lines, when preceded by virtual/filler lines. There was also no way to distinguish virtual and wrapped lines in the status column. Solution: Make sure to rebuild the statuscolumn, and replace variable `v:wrap` with `v:virtnum`. `v:virtnum` is negative when drawing virtual lines, zero when drawing the actual buffer line, and positive when drawing the wrapped part of a buffer line.
* | Merge pull request #21828 from clason/bump-libvtermChristian Clason2023-01-16
|\ \ | |/ |/| build(deps): bump libvterm to v0.3.1
| * build(deps): bump libvterm to v0.3.1Christian Clason2023-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Included patches: 821. By Paul "LeoNerd" Evans on 2022-12-29 Don't bother to emit the unrecognised sequence in DECRQSS response as it provides an echo roundtrip possibility 820. By Paul "LeoNerd" Evans on 2022-11-26 erase_internal() should only set fg/bg colour, resetting other attributes (especially RV) 819. By Paul "LeoNerd" Evans on 2022-11-09 Added vterm_screen_set_default_colors(), which repaints the cells in the buffer(s) 818. By Paul "LeoNerd" Evans on 2022-11-09 Permit either colour argument to be NULL to vterm_state_set_default_colors() 817. By Paul "LeoNerd" Evans on 2022-10-01 Delete the mk_wcswidth functions as they're not used; guard the CJK-wide one with an ifdef as by default we don't use it 816. By Paul "LeoNerd" Evans on 2022-10-01 Make sure to supply empty (void) prototype to functions that take no arguments in bin/vterm-ctrl.c
* | refactor: remove E5500, adjust testszeertzjq2023-01-16
| | | | | | | | | | | | Now with try_end() including more exception info, E5500 looks like redundant information. Adjust tests for more exception information.
* | feat(api): show more exception infoerw72023-01-16
|/
* Merge pull request #21731 from tk-shirasaka/fix/builtin_popup_on_ext_popupmenubfredl2023-01-15
|\ | | | | fix: properly close builtin popup in ext_popupmenu
| * fix: properly close builtin popup in ext_popupmenushirasaka2023-01-11
| |
* | test(fileio_spec): avoid expect_exit() without calling clear() (#21810)zeertzjq2023-01-15
| | | | | | | | | | Since before_each() doesn't call clear() in these tests, after_each() may call expect_exit() without calling clear() if a test is skipped, causing frequent test failures on Cirrus CI. Close the session instead.
* | vim-patch:8.2.4579: cannot use page-up and page-down in the cmdline popup menuzeertzjq2023-01-15
| | | | | | | | | | | | | | | | | | | | | | Problem: Cannot use page-up and page-down in the command line completion popup menu. Solution: Check for to page-up and page-down keys. (Yegappan Lakshmanan, closes vim/vim#9960) https://github.com/vim/vim/commit/5cffa8df7e3c28681b9e5deef6df395784359b6b Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | vim-patch:9.0.1195: restoring KeyTyped when building statusline not testedzeertzjq2023-01-14
| | | | | | | | | | | | | | Problem: Restoring KeyTyped when building statusline not tested. Solution: Add a test. Clean up and fix other tests. (closes vim/vim#11815) https://github.com/vim/vim/commit/378e6c03f98efc88e8c2675e05a548f9bb7889a1
* | vim-patch:8.2.4341: command line not redrawn when finishing popup menu (#21792)zeertzjq2023-01-14
| | | | | | | | | | | | | | | | | | | | | | Problem: Command line not redrawn when finishing popup menu and the screen has scrolled up. Solution: Redraw the command line after updating the screen. (closes vim/vim#9722) https://github.com/vim/vim/commit/414acd342f4a66d930da34d419929985b48bd301 Code change is N/A as Nvim doesn't call update_screen() here. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | fix(statuscolumn): make %l/%r respect 'number'/'relativenumber' (#21747)luukvbaal2023-01-13
| | | | | | Resolve https://github.com/neovim/neovim/issues/21745.
* | test: avoid consecutive mouse input at different positions (#21781)zeertzjq2023-01-13
| | | | | | | | The seconds call's position may override the first call if the first call isn't processed yet, defeating the purpose of the first call.