aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Merge pull request #31118 from bfredl/merehlbfredl2024-11-09
|\ | | | | refactor(tests): continue the global highlight definition work
| * refactor(tests): continue the global highlight definition workbfredl2024-11-08
| |
* | docs: misc (#30914)dundargoc2024-11-09
| | | | | | | | | | | | | | Co-authored-by: Ernie Rael <errael@raelity.com> Co-authored-by: Famiu Haque <famiuhaque@proton.me> Co-authored-by: Jade <spacey-sooty@proton.me> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | fix(vim.system): resolve executable paths on windowsLewis Russell2024-11-08
| | | | | | | | Fixes #31107
* | fix(cmdline): simplify and correct grapheme cluster adjustmentbfredl2024-11-08
|/
* Merge pull request #31040 from luukvbaal/cmdpreviewcursbfredl2024-11-08
|\ | | | | fix(inccommand): ensure cursor is where it belongs
| * fix(inccommand): ensure cursor is where it belongsLuuk van Baal2024-11-07
| | | | | | | | | | Problem: Inccommand preview callback may flush inaccurate cmdline cursor position. Solution: Ensure cursor is where it belongs when doing command preview.
* | test: add test for key following ignored mouse move (#31104)zeertzjq2024-11-07
| |
* | perf(mouse): only generate <MouseMove> for a new cell positon (#31103)errael2024-11-07
| | | | | | | | Problem: Can receive dozens of <MouseMove> events for same cell position. #30965 Solution: Leverage check_multiclick() to detect if cell position is unchanged.
* | fix(test): better management of tmpfilesLewis Russell2024-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When tmpdir is local. The returned values from tmpname may already exist. This can cause problems for tests which pass `create=false` as they may require the file to not exist yet. Solution: When creating tmp names, always remove it to ensure it doesn't exist, and optionally open it if `create~=false` Additionally refactor the tmpname code and flattrn some functions into constants. Also while debugging this issue. It was discovered that `exec_lua()` doesn't report error messages properly. This has been fixed.
* | vim-patch:9.1.0839: filetype: leo files are not recognizedChristian Clason2024-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: leo files are not recognized Solution: detect '*.leo' files as leo filetype, include a filetype plugin (Riley Bruins) References: https://github.com/ProvableHQ/leo closes: vim/vim#15988 https://github.com/vim/vim/commit/93f65a4ab8168c766e4d3794607762b52762ef82 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* | vim-patch:9.1.0840: filetype: idris2 files are not recognizedChristian Clason2024-11-05
| | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: idris2 files are not recognized Solution: detect '*.idr' files as idris2, '*.lidr' files as lidris2 and '*.ipkg' files as ipkg filetype (Serhii Khoma) closes: vim/vim#15987 https://github.com/vim/vim/commit/c04bc64ba61f2386fafb086b47f16f122a0c779a Co-authored-by: Serhii Khoma <srghma@gmail.com>
* | vim-patch:9.1.0841: tests: still preferring python2 over python3 (#31083)zeertzjq2024-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: tests: still preferring python2 over python3 Solution: prefer Python 3 when picking a Python program in Vim tests, by checking for the more specific python version first and only when python3 not found, check for the python binary (Yee Cheng Chin) Most OSes have Python 3 mapped to `python3` instead of `python`. Vim tests should prioritize using that instead of Python 2 in case that is still installed on the host system. closes: vim/vim#15986 https://github.com/vim/vim/commit/cef8ab2c75841cee1cd72266aa662fbe54fc0acc Cherry-pick test changes from patch 8.2.{2824,4684}. Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* | feat(defaults): unimpaired empty line below/above cursor #30984Yochem van Rosmalen2024-11-04
| |
* | feat(options)!: disallow setting hidden options #28400Famiu Haque2024-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: There are three different ways of marking an option as hidden, `enable_if = false`, `hidden = true` and `immutable = true`. These also have different behaviors. Options hidden with `enable_if = false` can't have their value fetched using Vim script or the API, but options hidden with `hidden = true` or `immutable = true` can. On the other hand, options with `hidden = true` do not error when trying to set their value, but options with `immutable = true` do. Solution: Remove `enable_if = false`, remove the `hidden` property for options, and use `immutable = true` to mark an option as hidden instead. Also make hidden option variable pointers always point to the default value, which allows fetching the value of every hidden option using Vim script and the API. This does also mean that trying to set a hidden option will now give an error instead of just being ignored.
* | feat(editor): handle new multibyte sequences in normal mode replacementbfredl2024-11-04
| | | | | | | | | | | | | | while the implementation is not tied to screen chars, it is a reasonable expectation to support the same size. If nvim is able to display a multibyte character, it will accept the same character as input, including in normal mode commands like r{char}
* | vim-patch:9.1.0835: :setglobal doesn't work properly for 'ffu' and 'tsrfu'zeertzjq2024-11-03
| | | | | | | | | | | | | | | | | | | | Problem: :setglobal doesn't work properly for 'ffu' and 'tsrfu' when the local value is set (after v9.1.0831) Solution: Check os_flags instead of buffer option variable (zeertzjq). closes: vim/vim#15980 https://github.com/vim/vim/commit/6eda269600b5ca952f28e808c662f67e581933d7
* | vim-patch:9.1.0832: :set doesn't work for 'cot' and 'bkc' after :setlocalzeertzjq2024-11-03
| | | | | | | | | | | | | | | | | | Problem: :set doesn't work for 'cot' and 'bkc' after :setlocal. Solution: clear the local flags when using :set (zeertzjq). closes: vim/vim#15981 https://github.com/vim/vim/commit/46dcd84d242db6b053cb5b777c896cede9ad9b27
* | vim-patch:9.1.0831: 'findexpr' can't be used as lambad or Funcref (#31058)zeertzjq2024-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 'findexpr' can't be used for lambads (Justin Keyes) Solution: Replace the findexpr option with the findfunc option (Yegappan Lakshmanan) related: vim/vim#15905 closes: vim/vim#15976 https://github.com/vim/vim/commit/a13f3a4f5de9c150f70298850e34747838904995 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | vim-patch:9.1.0830: using wrong highlight group for spaces for popupmenu ↵zeertzjq2024-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | (#31054) Problem: using wrong highlight group for spaces for popupmenu Solution: use original attribute instead of combined attributed (glepnir) closes: vim/vim#15978 https://github.com/vim/vim/commit/bc10be7a4060748ed1876ab91cf53a2a8701ac13 Co-authored-by: glepnir <glephunter@gmail.com>
* | vim-patch:9.1.0826: filetype: sway files are not recognizedChristian Clason2024-11-02
|/ | | | | | | | | | | | | | | | | | Problem: filetype: sway files are not recognized Solution: detect '*.sw' files as sway filetype, include a filetype plugin (Riley Bruins) References: https://github.com/FuelLabs/sway. Comments taken from their syntax documentation. File extension taken from the same documentation/GitHub's own recognition of these file types closes: vim/vim#15973 https://github.com/vim/vim/commit/84b5b1c660beb2f9e27de70687e41d39a023ae81 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* fix(lua): show stacktrace for error in vim.on_key() callback (#31021)zeertzjq2024-11-02
|
* feat(lsp)!: remove client-server handlers from vim.lsp.handlersLewis Russell2024-11-01
| | | | | | | | | | - Partition the handlers in vim.lsp.handlers as: - client to server response handlers (RCS) - server to client request handlers (RSC) - server to client notification handlers (NSC) Note use string indexes instead of protocol.methods for improved typing in LuaLS (tip: use hover on RCS, RSC or NSC).
* feat(lua): allow vim.on_key() callback to consume the key (#30939)errael2024-11-01
|
* vim-patch:9.1.0823: filetype: Zephyr overlay files not recognizedChristian Clason2024-10-31
| | | | | | | | | | | | | | | | Problem: filetype: Zephyr overlay files not recognized Solution: detect '*.overlay' files as dts filetype, include syntax tests for DTS files (Xudong Zheng) Reference: https://docs.zephyrproject.org/latest/build/dts/howtos.html closes: vim/vim#15963 https://github.com/vim/vim/commit/a68bd6f089239a51ba90026b18109707e601b107 Co-authored-by: Xudong Zheng <7pkvm5aw@slicealias.com>
* test: fix files being left behind (#31004)zeertzjq2024-10-31
|
* vim-patch:9.1.0822: topline might be changed in diff mode unexpectedly (#30988)zeertzjq2024-10-30
| | | | | | | | | | | | | Problem: topline might be changed in diff mode unexpectedly (Jaehwang Jung) Solution: do not re-calculate topline, when using line() func in diff mode. fixes: vim/vim#15812 closes: vim/vim#15950 https://github.com/vim/vim/commit/05a40e07c2f0e41b708c4c75a6aa7d0e7f6201a3 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(defaults): omit extraneous info from unimpaired mapping errors (#30983)Gregory Anders2024-10-29
|
* vim-patch:9.1.0820: tests: Mac OS tests are too flaky (#30980)zeertzjq2024-10-29
| | | | | | | | | | | | | Problem: tests: Mac OS tests are too flaky Solution: Increase max test timeout to 25 minutes, allow up to 10 retries on Mac OS runners, refactor runtest.vim (Milly). closes: vim/vim#15940 https://github.com/vim/vim/commit/baab7c08653a4e1b7227d6426d96cab030ccf9e8 Co-authored-by: Milly <milly.ca@gmail.com> Co-authored-by: K.Takata <kentkt@csc.jp>
* vim-patch:9.1.0821: 'findexpr' completion doesn't set v:fname to cmdline ↵zeertzjq2024-10-29
| | | | | | | | | | | argument Problem: 'findexpr' completion doesn't set v:fname to cmdline argument. Solution: Set v:fname to the cmdline argument as-is (zeertzjq). closes: vim/vim#15934 https://github.com/vim/vim/commit/20e045f78148c0ef0143c33ffe686fee72d29376
* vim-patch:9.1.0811: :find expansion does not consider 'findexpr'zeertzjq2024-10-29
| | | | | | | | | | | | Problem: :find expansion does not consider 'findexpr' Solution: Support expanding :find command argument using 'findexpr' (Yegappan Lakshmanan) closes: vim/vim#15929 https://github.com/vim/vim/commit/2f6efaccfd5c4e7df1f54ed0f41f329abbe05f60 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.1.0810: cannot easily adjust the |:find| commandzeertzjq2024-10-29
| | | | | | | | | | | | Problem: cannot easily adjust the |:find| command Solution: Add support for the 'findexpr' option (Yegappan Lakshmanan) closes: vim/vim#15901 closes: vim/vim#15905 https://github.com/vim/vim/commit/aeb1c97db5b9de4f4903e7f288f2aa5ad6c49440 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* test(pum): add test for item selection with 'rightleft' (#30968)zeertzjq2024-10-28
|
* fix(pum): don't select item when clicking to the left/right (#30967)zeertzjq2024-10-28
| | | | | | | Problem: Selecting an item in the right-click menu when clicking to the left/right of it is confusing, especially in a UI that doesn't support 'mousemoveevent'. Solution: Don't select an item when clicking to the left/right of the right-click menu.
* feat(diagnostics)!: sort underline severity_sort (#30898)Donatas2024-10-27
| | | | | feat(diagnostics)!: sort underline with severity_sort BREAKING CHANGE: underline will be applied with a higher value than `vim.hl.priorities.diagnostics`
* refactor(lsp): drop str_byteindex/str_utfindex wrappers #30915Tristan Knight2024-10-26
| | | | | * deprecate old signatures * move to new str_byteindex/str_utfindex signature * use single-underscore name (double-underscore is reserved for Lua itself)
* refactor(options)!: use OptVal for option defaults #26691Famiu Haque2024-10-25
| | | | | | | | | Problem: We use `void *` for option default values, which is confusing and can cause problems with type-correctness. It also doesn't accomodate for multitype options. On top of that, it also leads to default boolean option values not behaving correctly on big endian systems. Solution: Use `OptVal` for option default values. BREAKING CHANGE: - `:set {option}<` removes the local value for all global-local options instead of just string global-local options. - `:setlocal {option}<` copies the global value to the local value for number and boolean global-local options instead of removing the local value.
* vim-patch:9.1.0814: mapset() may remove unrelated mapping (#30941)zeertzjq2024-10-24
| | | | | | | | | Problem: mapset() may remove unrelated mapping whose {rhs} matches the restored mapping's {lhs}. Solution: only match by {lhs} when unmapping for mapset() (zeertzjq). closes: vim/vim#15935 https://github.com/vim/vim/commit/fdf135a0525746cc0ff85bed2fbbde320ddb6d0d
* fix(lsp): set tagstack on jump via goto methodsMathias Fussenegger2024-10-24
| | | | | Follow up to https://github.com/neovim/neovim/pull/30877 Fixes https://github.com/neovim/neovim/issues/30926
* fix(options): missing error check for global 'scl' and 'winhl' (#30919)zeertzjq2024-10-24
|
* test(012_directory_spec): fix flakiness on Windows (#30920)zeertzjq2024-10-24
| | | | Problem: 012_directory_spec is flaky on Windows. Solution: Use :%bwipe! instead :qall!.
* test(old): remove unnecessary :setglobal skipszeertzjq2024-10-24
|
* vim-patch:9.1.0806: tests: no error check when setting global 'briopt'zeertzjq2024-10-24
| | | | | | | | | | | Problem: tests: no error check when setting global 'briopt' Solution: also parse and check global 'briopt' value (Milly) closes: vim/vim#15911 https://github.com/vim/vim/commit/b38700ac81d90a652e5c8495056dd78df5babdde Co-authored-by: Milly <milly.ca@gmail.com>
* vim-patch:9.1.0804: tests: no error check when setting global 'cc'zeertzjq2024-10-24
| | | | | | | | | | | Problem: tests: no error check when setting global 'cc' Solution: also parse and check global 'cc' value (Milly) closes: vim/vim#15914 https://github.com/vim/vim/commit/a441a3eaabbfc14b4772e07ecbecaaff3bd06a58 Co-authored-by: Milly <milly.ca@gmail.com>
* vim-patch:9.1.0803: tests: no error check when setting global 'isk'zeertzjq2024-10-24
| | | | | | | | | | | Problem: tests: no error check when setting global 'isk' Solution: also parse and check global 'isk' value (Milly) closes: vim/vim#15915 https://github.com/vim/vim/commit/5e7a6a4a106923e45c67dae6810e4c9753f88025 Co-authored-by: Milly <milly.ca@gmail.com>
* vim-patch:9.1.0802: tests: no error check when setting global 'fdm' to empty ↵zeertzjq2024-10-24
| | | | | | | | | | | | | value Problem: tests: no error check when setting global 'fdm' to empty value Solution: Also check global 'fdm' value for being empty (Milly). closes: vim/vim#15916 https://github.com/vim/vim/commit/142cad1f88d1d3aa34b6050151e620b66185112e Co-authored-by: Milly <milly.ca@gmail.com>
* feat(stdlib): overload vim.str_byteindex, vim.str_utfindex #30735Tristan Knight2024-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: There are several limitations to vim.str_byteindex, vim.str_utfindex: 1. They throw given out-of-range indexes. An invalid (often user/lsp-provided) index doesn't feel exceptional and should be handled by the caller. `:help dev-error-patterns` suggests that `retval, errmsg` is the preferred way to handle this kind of failure. 2. They cannot accept an encoding. So LSP needs wrapper functions. #25272 3. The current signatures are not extensible. * Calling: The function currently uses a fairly opaque boolean value to indicate to identify the encoding. * Returns: The fact it can throw requires wrapping in pcall. 4. The current name doesn't follow suggestions in `:h dev-naming` and I think `get` would be suitable. SOLUTION: - Because these are performance-sensitive, don't introduce `opts`. - Introduce an "overload" that accepts `encoding:string` and `strict_indexing:bool` params. ```lua local col = vim.str_utfindex(line, encoding, [index, [no_out_of_range]]) ``` Support the old versions by dispatching on the type of argument 2, and deprecate that form. ```lua vim.str_utfindex(line) -- (utf-32 length, utf-16 length), deprecated vim.str_utfindex(line, index) -- (utf-32 index, utf-16 index), deprecated vim.str_utfindex(line, 'utf-16') -- utf-16 length vim.str_utfindex(line, 'utf-16', index) -- utf-16 index vim.str_utfindex(line, 'utf-16', math.huge) -- error: index out of range vim.str_utfindex(line, 'utf-16', math.huge, false) -- utf-16 length ```
* vim-patch:9.1.0809: filetype: petalinux config files not recognizedChristian Clason2024-10-23
| | | | | | | | | | | | | | | Problem: filetype: petalinux config files not recognized Solution: detect 'project-spec/*.conf' files as bitbake filetype (Wu, Zhenyu) References: https://www.amd.com/en/products/software/adaptive-socs-and-fpgas/embedded-software/petalinux-sdk.html closes: vim/vim#15926 https://github.com/vim/vim/commit/626b6ab48682b211c22ede5a6e63513c85f93e58 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* vim-patch:9.1.0805: tests: minor issues in gen_opt_test.vimzeertzjq2024-10-23
| | | | | | | | | | | | | | | Problem: tests: minor issues in gen_opt_test.vim Solution: fix restore value for 'undolevels', fix comment, fix wrong cpo value, add equality test for global-local options on switchback (Milly). closes: vim/vim#15913 https://github.com/vim/vim/commit/231480f9753fa3fb28e17b670550ce43172c0eba Cherry-pick gen_opt_test.vim change from patch 9.1.0807. Co-authored-by: Milly <milly.ca@gmail.com>
* vim-patch:9.1.0799: tests: gettwinvar()/gettabwinvar() tests are not ↵zeertzjq2024-10-23
| | | | | | | | | | | | | comprehensive Problem: tests: gettwinvar()/gettabwinvar() tests are not comprehensive Solution: Add more tests (Milly) closes: vim/vim#15920 https://github.com/vim/vim/commit/ceec8640df0f75c6e7759fbb3d7a1064313321fb Co-authored-by: Milly <milly.ca@gmail.com>