aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* vim-patch:9.0.1309: scrolling two lines with even line count and 'scrolloff' setzeertzjq2023-02-16
| | | | | | | | | | | Problem: Scrolling two lines with even line count and 'scrolloff' set. Solution: Adjust how the topline is computed. (closes vim/vim#10545) https://github.com/vim/vim/commit/1d6539cf36a7b6d1afe76fb6316fe662f543bf60 Cherry-pick test_scroll_opt.vim changes from patch 8.2.1432. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* Merge #22214 move init_default_autocmds to luaJustin M. Keyes2023-02-14
|\
| * refactor: move init_default_autocmds to luaglacambre2023-02-11
| | | | | | | | | | | | | | | | | | The original motivation for this change came from developping https://github.com/neovim/neovim/pull/22159, which will require adding more autocommand creation to Neovim's startup sequence. This change requires lightly editing a test that expected no autocommand to have been created from lua.
* | test: make expect_unchanged() less confusing (#22255)zeertzjq2023-02-15
| | | | | | | | | | | | | | | | Problem: The sleep before collecting the initial screen state is confusing and may lead to unexpected success if it comes after a blocking RPC call. Solution: Remove that sleep and add an "intermediate" argument.
* | refactor(api): consistent VALIDATE messages #22262Justin M. Keyes2023-02-14
| | | | | | | | | | | | | | | | | | | | Problem: Validation messages are not consistently formatted. - Parameter names sometimes are NOT quoted. - Descriptive names (non-parameters) sometimes ARE quoted. Solution: Always quote the `name` value passed to a VALIDATE macro _unless_ the value has whitespace.
* | Merge pull request #11756 from bfredl/crashfixbfredl2023-02-14
|\ \ | | | | | | custom statusline crash containing unprintable unicode
| * | fix(status): handle unprintable chars in the statuslineBjörn Linse2023-02-14
| | |
* | | Merge pull request #22108 from luukvbaal/statuscolumnLewis Russell2023-02-14
|\ \ \ | | | | | | | | perf(column): only build fold/sign column when present in 'statuscolumn'
| * | | perf(column): only build fold/sign column when present in 'statuscolumn'Luuk van Baal2023-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The fold and sign column is built and stored regardless of whether the corresponding item is present in 'statuscolumn'. Solution: Since the 'statuscolumn' parses itself, we can defer building the columns until the corresponding item is actually encountered.
* | | | refactor(api): VALIDATE macros #22256Justin M. Keyes2023-02-14
| | | | | | | | | | | | | | | | | | | | | | | | - VALIDATE() takes a format string - deduplicate check_string_array - VALIDATE_RANGE - validate UI args
* | | | test: remove unused field ext_float (#22243)zeertzjq2023-02-14
| | | |
* | | | refactor(api): VALIDATE macros #22187Justin M. Keyes2023-02-14
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Problem: - API validation involves too much boilerplate. - API validation errors are not consistently worded. Solution: Introduce some macros. Currently these are clumsy, but they at least help with consistency and avoid some nesting.
* | | fix(folds): cursorline highlight is not always applied on closed folds (#22242)luukvbaal2023-02-14
| | | | | | | | | | | | | | | | | | | | | Problem: The cursorline highlight logic checks for `w_cursor.lnum` which may be different from the line number passed to `win_line()` even when the cursor is actually on that line. Solution: Update cursor line highlight logic to check for the line number of the start of a closed fold if necessary.
* | | fix(tui): exit on input eofzeertzjq2023-02-14
| | |
* | | test(tui_spec): remove unnecessary arguments for remote UIzeertzjq2023-02-14
| | |
* | | feat(filetype): fall back to file extension when matching from hashbang (#22140)Jonas Strittmatter2023-02-13
| | | | | | | | | | | | | | | | | | If nothing matched in match_from_hashbang, also check the file extension table. For a hashbang like '#!/bin/env foo', this will set the filetype to 'fooscript' assuming the filetype for the 'foo' extension is 'fooscript' in the extension table.
* | | Merge pull request #22191 from lewis6991/feat/playground_impLewis Russell2023-02-13
|\ \ \ | | | | | | | | feat(treesitter): playground improvements
| * | | fix(treesitter): don't trample parsers when filetype!=langLewis Russell2023-02-10
| | | | | | | | | | | | | | | | | | | | This allows vim.treesitter.show_tree() to work on buffers where the filetype does not match the parser language name e.g, bash/sh.
* | | | fix(ui): make sure screen is valid after resizingzeertzjq2023-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When not inside an Ex command, screen_resize() calls update_screen(), which calls screenclear() and set the screen as valid. However, when inside an Ex command, redrawing is postponed so update_screen() screen doesn't do anything, and the screen is still invalid after the resize, causing ui_comp_raw_line() to be no-op until update_screen() is called on the main loop. Solution: Restore the call to screenclear() inside screen_resize() so that the screen is invalid after screen_resize(). Since screenclear() changes redraw type from UPD_CLEAR to UPD_NOT_VALID, it is called at most once for each resize, so this shouldn't change how much code is run in the common (not inside an Ex command) case.
* | | | build: don't check environment variable to detect CI (#22234)dundargoc2023-02-12
| | | | | | | | | | | | | | | | Instead use the cmake option, which should act as the definitive source to determine whether we use CI or not.
* | | | fix(filetype): make vim.filetype.match() work with contents only (#22181)Jonas Strittmatter2023-02-11
| | | | | | | | | | | | Co-authored-by: Gregory Anders <greg@gpanders.com>
* | | | vim-patch:9.0.1298: inserting register on the cmdline does not trigger incsearchzeertzjq2023-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Inserting a register on the command line does not trigger incsearch or update hlsearch. Solution: Have cmdline_insert_reg() return CMDLINE_CHANGED when appropriate and handle it correctly. (Ken Takata, closes vim/vim#11960) https://github.com/vim/vim/commit/c4b7dec38292fe1cfad7aa5f244031fc6f7c7a09 Co-authored-by: K.Takata <kentkt@csc.jp>
* | | | fix(rpc)!: preseve files when stdio channel is closed (#22137)zeertzjq2023-02-11
| |_|/ |/| | | | | | | | BREAKING CHANGE: Unsaved changes are now preserved rather than discarded when stdio channel is closed.
* | | fix(client): wait for session to exitbfredl2023-02-10
| | | | | | | | | | | | | | | | | | This replicates the old native.pid_wait(self._pid) call, except using the proper libuv pattern (run loop unitil exit callback)
* | | fix(tests): fixes for using vim.mpack and more ASANbfredl2023-02-10
| | |
* | | refactor(tests): move lua-client into core and use it for functionaltestsbfredl2023-02-10
|/ / | | | | | | | | | | | | | | Eliminates lua-client and non-static libluv as test time dependencies Note: the API for a public lua-client is not yet finished. The interface needs to be adjusted to work in the embedded loop of a nvim instance (to use it to talk between instances)
* | test(exit_spec): make sure that autocommands are triggered (#22188)zeertzjq2023-02-09
| | | | | | | | | | Previously, if the autocommands are not triggered, the tests may still pass because no assertion is done. Add an assertion so that the tests will fail if the autocommands aren't triggered.
* | fix(rpc): ignore redraw events when exiting (#22184)zeertzjq2023-02-09
| | | | | | | | When a TUI client has already stopped, handling UI events will cause a heap-use-after-free, so ignore them.
* | fix(rpc): ignore redraw events when not in UI client (#21892)zeertzjq2023-02-09
| | | | | | Otherwise it will crash.
* | build: create test/CMakeLists.txt and move test-related code (#22179)dundargoc2023-02-08
| | | | | | | | | | Having a clear separation between build code and test code makes it easier to get a higher-level understanding of how the neovim build works.
* | fix(decoration): don't show signcolumn for non-sign_text extmark (#22135)Lewis Russell2023-02-05
| | | | | | Fixes: #22127
* | 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