aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | fix(lsp): do not detach from buffer if there are uninitialized clients (#29029)Ilia Choly2024-05-27
| | | | | | | | | | Problem: if on_lines is called before the LSP is initialized, the buffer is detached. Solution: check for uninitialized clients before detaching.
* | vim-patch:9.1.0447: completion may be wrong when deleting all chars (#29040)glepnir2024-05-27
| | | | | | | | | | | | | | | | Problem: completion may be wrong when deleting all chars. Solution: reset compl_shown_match (glepnir). closes: https://github.com/vim/vim/pull/14854 https://github.com/vim/vim/commit/53387c55a13bc1013a6ab721d4bd0bd04c6935c4
* | perf: add fast path to vim.validate (#28977)Gregory Anders2024-05-27
| | | | | | | | | | | | For many small/simple functions (like those found in shared.lua), the runtime of vim.validate can far exceed the runtime of the function itself. Add an "overload" to vim.validate that uses a simple assertion pattern, rather than parsing a full "validation spec".
* | fix(treesitter): find buffer in multiple windows #28922Guilherme Soares2024-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 1. When interacting with multiple :InspectTree and the source buffer windows there is a high chance of errors due to the window ids not being updated and validated. 2. Not all InspectTree windows were closed when the source buffer was closed. Solution: 1. Update InspectTree window id on `CursorMoved` event and validate source buffer window id before trying to navigate to it. 2. Close all InspectTree windows
* | fix(drawline): don't draw beyond end of window (#29035)zeertzjq2024-05-27
| |
* | vim-patch:9.1.0446: getregionpos() inconsistent for partly-selected ↵zeertzjq2024-05-27
| | | | | | | | | | | | | | | | | | | | | | | | multibyte char (#29032) Problem: getregionpos() behaves inconsistently for a partly-selected multibyte char. Solution: Always use column of the first byte for a partly-selected multibyte char (zeertzjq). closes: vim/vim#14851 https://github.com/vim/vim/commit/ef73374dc3e4bf8104ba31d5b22517f8028b467a
* | fix(tui): reset clear_region attributes during startup #28713luukvbaal2024-05-26
| | | | | | | | | | | | Problem: Fix added in #28676 worked accidentally(used variables were themselves uninitialized at this point during startup) and does not always work. Solution: Reset attributes when clearing regions during startup.
* | fix(tohtml): properly handle multiple hl groups #29012Riley Bruins2024-05-26
| | | | | | | | | | | | | | | | | | Problem: :TOhtml doesn't properly handle virtual text when it has multiple highlight groups. It also improperly calculates position offset for multi-byte virt_text characters. Solution: Apply the `vim.api.nvim_strwidth` broadly to properly calculate character offset, and handle the cases where the `hl` argument can be a table of multiple hl groups.
* | refactor(tests): more global highlight definitionsbfredl2024-05-26
| |
* | Merge pull request #29006 from bfredl/apitestbfredl2024-05-26
|\ \ | | | | | | refactor(tests): use more global highlight definitions
| * | refactor(tests): use more global highlight definitionsbfredl2024-05-26
| | |
* | | vim-patch:9.1.0442: hare runtime files outdated (#29011)zeertzjq2024-05-26
|/ / | | | | | | | | | | | | | | | | | | | | Problem: hare runtime files outdated Solution: runtime(hare): update hare.vim to match upstream (Amelia Clarke) closes: vim/vim#14836 https://github.com/vim/vim/commit/35dfe58a540e2fb0eff953630f8e4fcbf4bc26ca Co-authored-by: Amelia Clarke <selene@perilune.dev>
* | refactor(tests): update screen:snapshot_util() to use new-style highlightsbfredl2024-05-25
| | | | | | | | | | | | | | | | | | | | | | This makes screen:snapshot_util() generate code with the new screen:add_extra_attr_ids { ... } pattern. For convenience, the old-style configuration is still detected and supported (until all tests have been refactored, which is my goal for the 0.11 cycle) Remove the last traces of the "ignore" attr anti-pattern. This code is no longer functional, it is just "ignore" argument being passed around like a hot potato at this point.
* | test(unit): skip flaky 'typval.c dict extend() works' testdundargoc2024-05-25
| |
* | refactor(lua): rewrite vim.highlight.range() (#28986)zeertzjq2024-05-25
| | | | | | | | - Use getregionpos(). - Use a single extmark for non-blockwise selection.
* | Merge pull request #28617 from glepnir/border_hlbfredl2024-05-25
|\ \ | | | | | | fix(float): missing default highlight for title
| * | fix(float): missing default highlight for titleglepnir2024-05-25
| | | | | | | | | | | | | | | | | | Problem: there is missing default title highlight when highlight not defined in title text chunk. Solution: when attr is not set use default title highlight group.
* | | vim-patch:9.1.0444: Not enough tests for getregion() with multibyte chars ↵zeertzjq2024-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#29000) Problem: Not enough tests for getregion() with multibyte chars. Solution: Add a few more tests (zeertzjq). closes: vim/vim#14844 https://github.com/vim/vim/commit/dff55a335889c746a79974f7c52cdcdebad682c2
* | | vim-patch:9.1.0443: Can't use blockwise selection with width for getregion() ↵zeertzjq2024-05-25
| |/ |/| | | | | | | | | | | | | | | | | | | | | (#28985) Problem: Can't use a blockwise selection with a width for getregion(). Solution: Add support for blockwise selection with width like the return value of getregtype() or the "regtype" value of TextYankPost (zeertzjq). closes: vim/vim#14842 https://github.com/vim/vim/commit/afc2295c2201ae87bfbb42d5f5315ad0583ccabf
* | fix(fs): make vim.fs.root work for relative paths and unnamed buffers (#28964)Gregory Anders2024-05-24
| | | | | | | | If a buffer does not have a backing file then fall back to the current working directory.
* | vim-patch:8.2.3158: strange error message when using islocked() with a ↵zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | number (#28962) Problem: Strange error message when using islocked() with a number. (Yegappan Lakshmanan) Solution: Check that the name is empty. https://github.com/vim/vim/commit/1840a7b4e3577e617f724c9d07ccc78195cc010a Use ll_name_len instead. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | feat(complete): specify reason for CompleteDoneFamiu Haque2024-05-24
| | | | | | | | | | Problem: `CompleteDone` currently does not specify the reason for why completion was done, which is problematic for completion plugins as they cannot know whether the event was triggered due to the completion being canceled, accepted, or for some other reason. Solution: Add a `reason` key to `v:event`, which is set by `CompleteDone` to indicate why completion ended.
* | fix: change deprecation presentationdundargoc2024-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecation with vim.deprecate is currently too noisy. Show the following warning instead: [function] is deprecated. Run ":checkhealth vim.deprecated" for more information. The important part is that the full message needs to be short enough to fit in one line in order to not trigger the "Press ENTER or type command to continue" prompt. The full information and stack trace for the deprecated functions will be shown in the new healthcheck `vim.deprecated`.
* | vim-patch:9.1.0439: Cannot filter the history (#28958)zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | Problem: Cannot filter the history Solution: Implement :filter :history closes: vim/vim#14835 https://github.com/vim/vim/commit/42a5b5a6d0d05255b9c464abe71f29c7677b5833 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.1.0441: getregionpos() can't properly indicate positions beyond ↵zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eol (#28957) Problem: getregionpos() can't properly indicate positions beyond eol. Solution: Add an "eol" flag that enables handling positions beyond end of line like getpos() does (zeertzjq). Also fix the problem that a position still has the coladd beyond the end of the line when its column has been clamped. In the last test case with TABs at the end of the line the old behavior is obviously wrong. I decided to gate this behind a flag because returning positions that don't correspond to actual characters in the line may lead to mistakes for callers that want to calculate the length of the selected text, so the behavior is only enabled if the caller wants it. closes: vim/vim#14838 https://github.com/vim/vim/commit/2b09de910458247b70751928217422c38fd5abf8
* | vim-patch:9.1.0438: Wrong Ex command executed when :g uses '?' as delimiter ↵zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | | | (#28956) Problem: Wrong Ex command executed when :g uses '?' as delimiter and pattern contains escaped '?'. Solution: Don't use "*newp" when it's not allocated (zeertzjq). closes: vim/vim#14837 https://github.com/vim/vim/commit/3074137542961ce7b3b65c14ebde75f13f5e6147
* | vim-patch:9.1.0436: Crash when using '?' as separator for :s (#28955)zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | Problem: Crash when using '?' as separator for :s and pattern contains escaped '?'s (after 9.1.0409). Solution: Always compute startplen. (zeertzjq). related: neovim/neovim#28935 closes: 14832 https://github.com/vim/vim/commit/789679cfc4f39505b135220672b43a260d8ca3b4
* | vim-patch:9.1.0435: filetype: cygport files are not recognizedChristian Clason2024-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: cygport files are not recognized Solution: Recognize '*.cygport' files as sh filetype (Ken Takata) https://cygwin.github.io/cygport/cygport_in.html closes: vim/vim#14833 https://github.com/vim/vim/commit/cd79f8fbd34cdb918153d9fa3821eb4092b7b5fc Co-authored-by: K.Takata <kentkt@csc.jp>
* | fix(comment): fall back to using trimmed comment markers (#28938)Evgeni Chasnovski2024-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Currently comment detection, addition, and removal are done by matching 'commentstring' exactly. This has the downside when users want to add comment markers with space (like with `-- %s` commentstring) but also be able to uncomment lines that do not contain space (like `--aaa`). Solution: Use the following approach: - Line is commented if it matches 'commentstring' with trimmed parts. - Adding comment is 100% relying on 'commentstring' parts (as is now). - Removing comment is first trying exact 'commentstring' parts with fallback on trying its trimmed parts.
* | fix(lsp): check if buffer was detached in on_init callback (#28914)Ilia Choly2024-05-23
| | | | | | Co-authored-by: Jongwook Choi <wookayin@gmail.com>
* | fix(lsp): trigger LspDetach on buffer delete (#28795)Andre Toerien2024-05-23
| | | | | | Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
* | vim-patch:9.1.0433: Wrong yanking with exclusive selection and ve=all (#28933)zeertzjq2024-05-23
| | | | | | | | | | | | | | | | | | | | Problem: Wrong yanking with exclusive selection and virtualedit=all, and integer overflow when using getregion() on it. Solution: Set coladd when decreasing column and 'virtualedit' is active. Add more tests for getregion() with 'virtualedit' (zeertzjq). closes: vim/vim#14830 https://github.com/vim/vim/commit/701ad50a9efcf0adfe6d787b606c4e4dbd31f26d
* | fix(shada): restore search pattern length properly (#28929)zeertzjq2024-05-23
| |
* | vim-patch:9.1.0430: getregionpos() doesn't handle one char selection (#28924)zeertzjq2024-05-23
| | | | | | | | | | | | | | | | | | | | Problem: getregionpos() doesn't handle one char selection. Solution: Handle startspaces differently when is_oneChar is set. Also add a test for an exclusive charwise selection with multibyte chars (zeertzjq) closes: vim/vim#14825 https://github.com/vim/vim/commit/52a6f348874778cf315b47d9e8b5f818f4b97277
* | fix: merge all provider healthchecks into a single health.luadundargoc2024-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will help manage the overly granular checkhealth completion to go from ``` vim.health vim.lsp vim.provider.clipboard vim.provider.node vim.provider.perl vim.provider.python vim.provider.ruby vim.treesitter ``` to ``` vim.health vim.lsp vim.provider vim.treesitter ```
* | vim-patch:62ccaa6: runtime(termdebug): check for gdb file/dir before using ↵zeertzjq2024-05-22
| | | | | | | | | | | | | | | | | | | | | | | | as buffer name (#28908) Add test so that this doesn't regress. fixes: vim/vim#12718 closes: vim/vim#14792 https://github.com/vim/vim/commit/62ccaa60d5f7f9a13c758bd5e55b7ca6855a6de9 Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
* | vim-patch:9.1.0427: tests: some issues with termdebug mapping test (#28907)zeertzjq2024-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: tests: some issues with termdebug mapping test Solution: Use assert_{true,false} if suitable, change order of expected and actual arguments in assert() calls. (Ken Takata) closes: vim/vim#14818 related: 7fbbd7f https://github.com/vim/vim/commit/ffed1540f36eb4a2255d7d824c9466d3d8fd581e Co-authored-by: Ken Takata <kentkt@csc.jp>
* | vim-patch:9.1.0428: Tag guessing leaves wrong search history with very short ↵zeertzjq2024-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | names Problem: Tag guessing leaves wrong search history with very short names (after 9.1.0426). Solution: Use the correct variable for pattern length (zeertzjq). closes: vim/vim#14817 https://github.com/vim/vim/commit/42cd192daa4b7f29131c7be1beaecb6067e96266 Cherry-pick Test_tagbsearch() changes from patch 9.0.0767.
* | vim-patch:9.1.0426: too many strlen() calls in search.czeertzjq2024-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in search.c Solution: refactor code and remove more strlen() calls, use explicit variable to remember strlen (John Marriott) closes: vim/vim#14796 https://github.com/vim/vim/commit/8c85a2a49acf80e4f53ec51e6ff2a5f3830eeddb Co-authored-by: John Marriott <basilisk@internode.on.net>
* | fix(lsp): semantic token functions allow "0" bufnr #28849Riley Bruins2024-05-21
| | | | | | aligns with ":help dev-patterns"
* | feat(signs)!: place higher-priority signs from the left #27781Tobias Schmitz2024-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Higher-priority signs may be hidden by lower-priority signs. Solution: Place higher-priority signs from the left. Example: nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='H', priority=1}) nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='W', priority=2}) nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='E', priority=3}) Before: | | H | W E | ^ | | Not visible After: | | | E W | H | | ^ Not visible Fixes #16632
* | vim-patch:9.1.0399: block_editing errors out when using del (#28867)zeertzjq2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: block_editing errors out when using del (@Jamarley) Solution: Change ins_len from size_t to int and properly check that it doesn't become negative There is a check in os.c that verifies that `ins_len` does not become negative: ``` if (pre_textlen >= 0 && (ins_len = len - pre_textlen - offset) > 0) ``` However this only works, if ins_len can actually become negative and unfortunately, ins_len has been declared as `size_t` so instead of becoming negative it will wrap around and be very large. So let's define it as integer, after which the condition above properly catches this condition. fixes: vim/vim#14734 closes: vim/vim#14735 https://github.com/vim/vim/commit/d5c8c0920e1eee9ff7a9fa5168d8e85c01670630 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.1.0423: getregionpos() wrong with blockwise mode and multibytezeertzjq2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getregionpos() wrong with blockwise mode and multibyte. Solution: Use textcol and textlen instead of start_vcol and end_vcol. Handle coladd properly (zeertzjq). Also remove unnecessary buflist_findnr() in add_regionpos_range(), as getregionpos() has already switched buffer. closes: vim/vim#14805 https://github.com/vim/vim/commit/c95e64f41f7f6d1bdc95b047ae9b369743c8637b
* | vim-patch:9.1.0394: Cannot get a list of positions describing a regionzeertzjq2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot get a list of positions describing a region (Justin M. Keyes, after v9.1.0120) Solution: Add the getregionpos() function (Shougo Matsushita) fixes: vim/vim#14609 closes: vim/vim#14617 https://github.com/vim/vim/commit/b4757e627e6c83d1c8e5535d4887a82d6a5efdd0 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | vim-patch:9.1.0425: filetype: purescript files are not recognizedChristian Clason2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: purescript files are not recognized Solution: recognize '*.purs' files as purescript filetype, include basic purescript filetype plugin (Riley Bruins) Reference: https://github.com/purescript/documentation/blob/master/language/Syntax.md#comments closes: vim/vim#14813 https://github.com/vim/vim/commit/155583a5c317881e60828e3972383436ac197ee8 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* | vim-patch:9.1.0424: filetype: slint files are not recognizedChristian Clason2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: slint files are not recognized Solution: Detect '*.slint' files as slint filetype, include basic sling filetype plugin (Riley Bruins) closes: vim/vim#14808 https://github.com/vim/vim/commit/aa3104b07a3e5e7cc41310f1fbfb00f71ef801a2 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* | vim-patch:9.1.0421: filetype: hyprlang files are not recognizedChristian Clason2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: hyprlang files are not recognized Solution: recognize 'hypr{land,paper,idle,lock}.conf' files as 'hyprlang' filetype, add hyprlang ftplugin (Riley Bruins) closes: vim/vim#14803 https://github.com/vim/vim/commit/5f1b115afd92544ce64d563da0d8ee9844abb10a Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* | refactor!: remove `nvim` and `provider` module for checkhealthdundargoc2024-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The namespacing for healthchecks for neovim modules is inconsistent and confusing. The completion for `:checkhealth` with `--clean` gives ``` nvim provider.clipboard provider.node provider.perl provider.python provider.ruby vim.lsp vim.treesitter ``` There are now three top-level module names for nvim: `nvim`, `provider` and `vim` with no signs of stopping. The `nvim` name is especially confusing as it does not contain all neovim checkhealths, which makes it almost a decoy healthcheck. The confusion only worsens if you add plugins to the mix: ``` lazy mason nvim nvim-treesitter provider.clipboard provider.node provider.perl provider.python provider.ruby telescope vim.lsp vim.treesitter ``` Another problem with the current approach is that it's not easy to run nvim-only healthchecks since they don't share the same namespace. The current approach would be to run `:che nvim vim.* provider.*` and would also require the user to know these are the neovim modules. Instead, use this alternative structure: ``` vim.health vim.lsp vim.provider.clipboard vim.provider.node vim.provider.perl vim.provider.python vim.provider.ruby vim.treesitter ``` and ``` lazy mason nvim-treesitter telescope vim.health vim.lsp vim.provider.clipboard vim.provider.node vim.provider.perl vim.provider.python vim.provider.ruby vim.treesitter ``` Now, the entries are properly sorted and running nvim-only healthchecks requires running only `:che vim.*`.
* | vim-patch:9.1.0418: Cannot move to previous/next rare word (#28822)zeertzjq2024-05-18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot move to previous/next rare word (Colin Kennedy) Solution: Add the ]r and [r motions (Christ van Willegen) fixes: vim/vim#14773 closes: vim/vim#14780 https://github.com/vim/vim/commit/8e4c4c7d87def2b100a5d64dc518ef85d9de8765 Co-authored-by: Christ van Willegen - van Noort <github.com@vanwillegen-vannoort.nl>
* | fix(move): half-page scrolling with resized grid at eob (#28821)zeertzjq2024-05-18
| |