aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
| * | test: remove helpers.sleep()Lewis Russell2024-01-12
| | |
| * | test: do not inject vim module into global helpersLewis Russell2024-01-12
| | |
* | | vim-patch:9.1.0016: default diff highlighting is too noisyChristian Clason2024-01-12
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: default diff highlighting is too noisy Solution: Link diff highlighting groups to new Added/Removed/Changed, revert previous change (Romain Lafourcade) Remove diff* links added in vim/vim#13776 and doc added in commit b1392be The links added in vim/vim#13776 are way too noisy for the contexts in which the `diff` syntax is applied (git commits, patches, etc.). This commit: - removes those links - adds new default highlighting groups Added, Changed and Removed - links the diff highlighting groups to those new defaults - removes the doc changes - adjusts the syntax_completion test for those newly added group names Note: Changes to the default color schemes will be handled separately, by adding links to those newly created Added/Removed/Changed highlighting groups. related: vim/vim#13776 closes vim/vim#13825 https://github.com/vim/vim/commit/124371c5a149a8c0c75c04b6c90ac11e71a0aa97 Co-authored-by: Romain Lafourcade <romain.lafourcade@razorfish.fr>
* | vim-patch:9.1.0011: regexp cannot match combining chars in collection (#26992)zeertzjq2024-01-12
|/ | | | | | | | | | | | | | Problem: regexp cannot match combining chars in collection Solution: Check for combining characters in regex collections for the NFA and BT Regex Engine Also, while at it, make debug mode work again. fixes vim/vim#10286 closes: vim/vim#12871 https://github.com/vim/vim/commit/d2cc51f9a1a5a30ef5d2e732f49d7f495cae24cf Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(doc): improve doc generation of types using lpegLewis Russell2024-01-11
| | | | Added a lpeg grammar for LuaCATS and use it in lua2dox.lua
* feat(vim.iter): add Iter:flatten (#26786)JD2024-01-10
| | | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Jongwook Choi <wookayin@gmail.com>
* fix(pum): handle right-click menu repositioning with multigrid (#26975)zeertzjq2024-01-10
|
* fix(terminal): use terminal buffer for TermRequest autocommand (#26974)Gregory Anders2024-01-09
|
* feat(terminal): trigger TermRequest autocommand events (#22159)Ghjuvan Lacambre2024-01-09
| | | | | | | | | | This commit implements a new TermRequest autocommand event and has Neovim emit this event when children of terminal buffers emit an OSC or DCS sequence libvterm does not handle. The TermRequest autocommand event has additional data in the v:termrequest variable. Co-authored-by: Gregory Anders <greg@gpanders.com>
* fix(extmarks): blending space shouldn't overwrite wide char (#26960)zeertzjq2024-01-09
|
* fix(extmarks): handle overwriting right half of wide char (#26951)zeertzjq2024-01-09
|
* refactor(options): use schar_T representation for fillchars and listcharsbfredl2024-01-08
| | | | | | | | | | | A bit big, but practically it was a lot simpler to change over all fillchars and all listchars at once, to not need to maintain two parallel implementations. This is mostly an internal refactor, but it also removes an arbitrary limitation: that 'fillchars' and 'listchars' values can only be single-codepoint characters. Now any character which fits into a single screen cell can be used.
* fix(test/tui_spec): pass the expected NULL-sentinel to execl()James McCoy2024-01-06
| | | | | | | | | | | | Since execl() is a variadic function, it requries a NULL-terminal to indicate the end of its argument list, c.f. exec(3) > The first argument, by convention, should point to the filename > associated with the file being executed. The list of arguments *must* > be terminated by a null pointer This fixes the failure seen on aarch64 and i386, due to garbage data being considered part of the variadic arguments.
* vim-patch:9.1.0012: regression with empty inner blocks introducedzeertzjq2024-01-06
| | | | | | | | | | | | | | Problem: regression with empty inner blocks introduced (after v9.1.0007) Solution: Set correct cursor position, Check for visual mode being active (Maxim Kim) relates: vim/vim#13514 closes: vim/vim#13819 https://github.com/vim/vim/commit/3779516988f14f2070d827514c79383334a0946b Co-authored-by: Maxim Kim <habamax@gmail.com>
* vim-patch:9.1.0007: can select empty inner text blockszeertzjq2024-01-06
| | | | | | | | | | | | | | | Problem: can select empty inner text blocks (laurentalacoque) Solution: make selecting empty inner text blocks an error textobjects: Make selecting inner empty blocks an error fixes: vim/vim#13514 closes: vim/vim#13523 https://github.com/vim/vim/commit/ad4d7f446dc6754bde212234d46f4849b520b6e0 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(column): fill 'statuscolumn' clickdefs with evaluated width (#26891)luukvbaal2024-01-05
|
* fix(terminal): check if mouse on statusline/tabline/winbar/vsep (#26892)zeertzjq2024-01-05
|
* vim-patch:9.1.0010: Keymap completion is not available (#26888)zeertzjq2024-01-05
| | | | | | | | | | | | | Problem: Keymap completion is not available Solution: Add keymap completion (Doug Kearns) Add keymap completion to the 'keymap' option, user commands and builtin completion functions. closes: vim/vim#13692 https://github.com/vim/vim/commit/81642d9d6ff5cd6a90a012b1b98632ce51eeb1a8 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* fix(decorations): validate botline for on_winJaehwang Jung2024-01-04
| | | | | | | | | | | | | | | | | | | Problem: Many decoration providers (treesitter injection highlighting, semantic token highlighting, inlay hint) rely on the correctness of the `botline` argument of `on_win` callback. However, `botline` can be smaller than the actual line number of the last displayed line if some lines are folded. In such cases, some decorations will be missing in the lines not covered by `botline`. Solution: Validate `botline` when invoking `on_win`. NOTE: It seems that the old code was deliberately avoiding this presumably due to performance reasons. However, I haven't experienced noticeable lag after this change, and I believe the cost of botline computation would be much smaller than the cost of decoration providers.
* vim-patch:9.1.0001: when closing window, wincmd p may failChristian Clason2024-01-03
| | | | | | | | | | | | | | | | | | | | Avoid `prevwin == curwin` when closing `curwin` Problem: When closing the current window (or when moving it to a tabpage), the previous window may refer to the new current window (`winnr() == winnr('#')`) if that window is selected as the new current window. Solution: Set `prevwin = NULL` when switching away from an invalid `curwin` and the target window was the `prevwin`. (Sean Dewar) related: vim/vim#4537 closes: vim/vim#13762 https://github.com/vim/vim/commit/bf44b69d1f91d9778ae1887128c63d35d9a3d19b Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
* vim-patch:9.1.0002: a closing fold expr, may start a new fold (#26876)zeertzjq2024-01-04
| | | | | | | | | | | | | | | Problem: a closing fold expression may unexpectedly start a new fold when it should end a fold (reported by Shota Nozaki) Solution: if a fold hasn't started yet, do not immediately start a new fold with level 1 (Shota Nozaki) fixes: vim/vim#12768 closes: vim/vim#13748 https://github.com/vim/vim/commit/0689b870595c687a23e102913ce5037f65d03748 Co-authored-by: Shota Nozaki <emonkak@gmail.com>
* feat(lua): add noref to deepcopyLewis Russell2024-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Currently `deepcopy` hashes every single tables it copies so it can be reused. For tables of mostly unique items that are non recursive, this hashing is unnecessarily expensive Solution: Port the `noref` argument from Vimscripts `deepcopy()`. The below benchmark demonstrates the results for two extreme cases of tables of different sizes. One table that uses the same table lots of times and one with all unique tables. | test | `noref=false` (ms) | `noref=true` (ms) | | -------------------- | ------------------ | ----------------- | | unique tables (50) | 6.59 | 2.62 | | shared tables (50) | 3.24 | 6.40 | | unique tables (2000) | 23381.48 | 2884.53 | | shared tables (2000) | 3505.54 | 14038.80 | The results are basically the inverse of each other where `noref` is much more performance on tables with unique fields, and `not noref` is more performant on tables that reuse fields.
* refactor: format test/*Justin M. Keyes2024-01-03
|
* build: enable lintlua for test/ dirJustin M. Keyes2024-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Not all Lua code is checked by stylua. Automating code-style is an important mechanism for reducing time spent on accidental (non-essential) complexity. Solution: - Enable stylua for entire `test/` directory. - Exclude these high-churn files until this issue is resolved: https://github.com/JohnnyMorganz/StyLua/issues/829 ``` test/functional/ui/decorations_spec.lua | 3560 ++++++++++++++++++++++++++++++++++++---------------- test/functional/ui/float_spec.lua | 5826 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------- test/functional/ui/multigrid_spec.lua | 1349 ++++++++++++++------ ``` - Make surgical changes to these files (or add `stylua: ignore` in some small scopes) to improve the result: ``` test/functional/vimscript/msgpack_functions_spec.lua | 1414 +++++++++++++++------ test/functional/api/buffer_spec.lua | 1389 +++++++++++---------- test/functional/api/vim_spec.lua | 2740 +++++++++++++++++++++++----------------- ``` - These "high churn" files are NOT excluded because the changes are largely an improvement: ``` test/functional/plugin/lsp_spec.lua | 2198 ++++++++++++++++++--------------- test/functional/plugin/shada_spec.lua | 4078 +++++++++++++++++++++++++++++++++++------------------------- test/functional/ui/cmdline_spec.lua | 1199 +++++++++++------- test/functional/ui/popupmenu_spec.lua | 1267 +++++++++++-------- test/functional/ui/messages_spec.lua | 1643 +++++++++++++++--------- ``` - TODO: how to check "all directories"? With `GLOB_DIRS *` and `/.deps/` (or `.deps/`) in `.styluaignore`, Lua code in `.deps/` is still checked...
* feat(lsp): support connect via named pipes/unix domain sockets (#26032)TheLeoP2024-01-02
| | | | | Closes https://github.com/neovim/neovim/issues/26031 Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
* feature(diagnostic): add `vim.diagnostic.count()` (#26807)Evgeni Chasnovski2024-01-01
| | | | | | | | | | | | | feat(diagnostic): add `vim.diagnostic.count()` Problem: Getting diagnostic count based on the output of `vim.diagnostic.get()` might become costly as number of diagnostic entries grows. This is because it returns a copy of diagnostic cache entries (so as to not allow users to change them in place). Getting information about diagnostic count is frequently used in statusline, so it is important to be as fast as reasonbly possible. Solution: Add `vim.diagnostic.count()` which computes severity counts without making copies.
* refactor(health): refactor provider healthchecksGregory Anders2024-01-01
| | | | | | * Prefer pure Lua functions over vim.fn * Split up provider healthchecks into separate modules to help manage complexity
* test(functional): remove faulty pending checkChristian Clason2023-12-30
| | | | | | | | | Problem: `functional/vimscript/api_functions_spec` skips a test if the runtime files are not generated, but this check was broken in a refactor. Solution: Since runtime files are now generated for all test targets, do not skip this test.
* refactor: fix luals warningsdundargoc2023-12-30
|
* build: various improvementsdundargoc2023-12-30
| | | | | | | | | | - Use `#pragma once` for `cmake.config/config.h.in` - Remove unused variable `CACHED_GENERATED_DIR` - Reorganize and sort variables - Introduce `STYLUA_DIRS` variable to ensure the `formatlua` and `lintlua-stylua` operates on the same files. - Adjust variable scope to avoid using hacky directory properties. - Add more necessary runtime files as test dependencies
* docs: convert BACKERS.md to backers.txtdundargoc2023-12-28
| | | | | | There is no reason for this file to be in project root, which is crowded as is. This also fits nicely part of the ongoing work towards gathering as much of the documentation as possible into one place.
* fix(drawline): don't use temporary "v" variable when not needed (#26777)zeertzjq2023-12-28
|
* docs: small fixes (#26651)dundargoc2023-12-28
| | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: WillLillis <wlillis@umass.edu>
* fix(clipboard): make getreg() accurate for clipboard registers (#26740)JD2023-12-28
| | | | Problem: getreg("*") / getreg("+") disagree with :registers. Solution: Avoid falling back to unnamed register if provider fails.
* vim-patch:9.0.2188: cursor wrong after { in single line buffer (#26766)zeertzjq2023-12-28
| | | | | | | | | | | | | | Problem: cursor wrong after { in single line buffer (Edwin Chan) Solution: do not place the cursor at the end for a single line buffer when moving backwards (Gary Johnson) closes: vim/vim#13780 closes: vim/vim#13783 https://github.com/vim/vim/commit/9e6549d2fb282c45a2492ea95fe7ba54c2082c3e Co-authored-by: Gary Johnson <garyjohn@spocom.com>
* vim-patch:9.0.2187: Visual not drawn with 'breakindent' when line doesn't ↵zeertzjq2023-12-28
| | | | | | | | | | | | fit (#26765) Problem: Visual selection isn't drawn with 'breakindent' when the line doesn't fit in the window (Jaehwang Jung) Solution: Adjust wlv->fromcol also for 'breakindent' (zeertzjq) closes: vim/vim#13767 closes: vim/vim#13768 https://github.com/vim/vim/commit/23627722d36b49e38ba6f8dc6bb3ebe19c98a83b
* fix(inccommand): don't preview in Ex mode (#26587)Raphael2023-12-27
|
* feat(defaults): map Q and @x to repeat in Visual mode (#26495)Nacho Nieva2023-12-27
|
* test: simplify vim.fs testsdundargoc2023-12-26
| | | | The exec_lua wrapper is no longer necessary.
* fix(column): correct width after truncated 'statuscolumn' error (#26737)luukvbaal2023-12-26
| | | | | Problem: Default number column has incorrect width after 'statuscolumn' is unset due to an error, but was also truncated. Solution: Reverse 'statuscolumn' error and truncate return branches.
* feat(extmarks): add virt_text_repeat_linebreak flag (#26625)luukvbaal2023-12-26
| | | | | | Problem: Unable to predict which byte-offset to place virtual text to make it repeat visually in the wrapped part of a line. Solution: Add a flag to nvim_buf_set_extmark() that causes virtual text to repeat in wrapped lines.
* feat(vim.deprecate): only issue warning if neovim version is high enoughdundargoc2023-12-25
| | | | | | | | | | | | As specified by MAINTAIN.md, features should be soft deprecated at first (meaning no warnings) to give people a chance to adjust. The problem with this approach is that deprecating a feature becomes harder than usual as during the soft deprecation period you need to remember not to issue a warning, and during the hard deprecation period you need to remember to start issuing a warning. This behavior is only enforced if the `plugin` parameter is `nil` as plugins may not want this specific behavior.
* refactor(cpoptions): remove 'p'bfredl2023-12-25
| | | | | | Deleting a cpo flag a day keeps the doctor away We don't need two different ways to indent LISP code
* refactor(drawline): reduce size of wlv.extra[] (#26733)zeertzjq2023-12-25
| | | It's now only used for transchar_hex(), which only needs 11 bytes.
* test(extmarks): improve tests for ui_watched (#26732)zeertzjq2023-12-25
|
* feat(health): make :checkhealth support more split modifiers (#26731)zeertzjq2023-12-25
|
* feat(health): checkhealth buffer can show in a split window (#26714)Pablo Arias2023-12-25
| | | | | | :checkhealth now respects :vertical and :horizontal. For example: :vertical checkhealth foo bar will open the healthcheck buffer in a vertical split.
* fix(treesitter): outdated highlight due to tree with outdated regionJaehwang Jung2023-12-24
| | | | | | | | | | | | | Problem: A region managed by an injected parser may shrink after re-running the injection query. If the updated region goes out of the range to be parsed, then the corresponding tree will remain outdated, possibly retaining the nodes that shouldn't exist anymore. This results in outdated highlights. Solution: Re-parse an invalid tree if its region intersects the range to be parsed.
* Merge pull request #26642 from famiu/refactor/options/misczeertzjq2023-12-24
|\ | | | | refactor(options): miscellanous refactors
| * refactor(options): remove side effects from `check_num_option_bounds()`Famiu Haque2023-12-24
| |