aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | Merge pull request #20984 from notomo/fix-message-kind-on-historybfredl2022-11-13
|\ \ | | | | | | fix(ui-ext): correct message kind in history before vim.ui_attach()
| * | fix(ui-ext): correct message kind in history before vim.ui_attach()notomo2022-11-07
| | |
* | | test(lua/ui_spec): fix Ctrl-C test flakiness (#21039)zeertzjq2022-11-13
| | | | | | | | | Prevent Ctrl-C from flushing the command that starts the prompt.
* | | vim-patch:9.0.0866: no test for what patch 8.2.2207 fixes (#21034)zeertzjq2022-11-13
| | | | | | | | | | | | | | | | | | Problem: No test for what patch 8.2.2207 fixes. Solution: Add a test case. (closes vim/vim#11531) https://github.com/vim/vim/commit/f7570f2107d91f35dc67dd0e400fc638585b226c
* | | fix: vim.ui.input always calls callback #21006Steven Arcangeli2022-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to #20883 Related: #18144 This patch changes the behavior of the default `vim.ui.input` when the user aborts with `<C-c>`. Currently, it produces an error message + stack and causes `on_confirm` to not be called. With this patch, `<C-c>` will cause `on_confirm` to be called with `nil`, the same behavior as when the user aborts with `<Esc>`. I can think of three good reasons why the behavior should be this way: 1. Easier for the user to understand** It's not intuitive for there to be two ways to abort an input dialog that have _different_ outcomes. As a user, I would expect any action that cancels the input to leave me in the same state. As a plugin author, I see no value in having two possible outcomes for aborting the input. I have to handle both cases, but I can't think of a situation where I would want to treat one differently than the other. 2. Provides an API that can be overridden by other implementations** The current contract of "throw an error upon `<C-c>`" cannot be replicated by async implementations of `vim.ui.input`. If the callsite wants to handle the case of the user hitting `<C-c>` they need to use `pcall(vim.ui.input, ...)`, however an async implementation will instantly return and so there will be no way for it to produce the same error-throwing behavior when the user inputs `<C-c>`. This makes it impossible to be fully API-compatible with the built-in `vim.ui.input`. 3. Provides a useful guarantee to the callsite** As a plugin author, I want the guarantee that `on_confirm` will _always_ be called (only catastrophic errors should prevent this). If I am in the middle of some async thread of logic, I need some way to resume that logic after handing off control to `vim.ui.input`. The only way to handle the `<C-c>` case is with `pcall`, which as already mentioned, breaks down if you're using an alternative implementation.
* | | feat(extmarks): allow preventing spellchecking with spell = falseThomas Vigouroux2022-11-12
| |/ |/|
* | feat(checkhealth): use "help" syntax, avoid tabpage #20879Justin M. Keyes2022-11-11
| | | | | | | | | | | | | | | | | | - If Nvim was just started, don't create a new tab. - Name the buffer "health://". - Use "help" syntax instead of "markdown". It fits better, and eliminates various workarounds. - Simplfy formatting, avoid visual noise. - Don't print a "INFO" status, it is noisy. - Drop the ":" after statuses, they are already UPPERCASE and highlighted.
* | vim-patch:8.2.2207: illegal memory access if popup menu items are changed ↵zeertzjq2022-11-12
| | | | | | | | | | | | | | | | | | | | | | (#21028) Problem: Illegal memory access if popup menu items are changed while the menu is visible. (Tomáš Janoušek) Solution: Make a copy of the text. (closes vim/vim#7537) https://github.com/vim/vim/commit/38455a921395a56690790c8c1d28c1c43ca04c8a Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | fix(messages): don't set cmdline_row when messages have scrolled (#21015)zeertzjq2022-11-11
| | | | | | | | | | When 'cmdheight' is changed while messages have scrolled, the position of msg_grid is not moved up, so cmdline_row should not be set based on the position of msg_grid.
* | fix(messages): reset msg_grid_scroll_discount when redrawing (#21000)zeertzjq2022-11-10
| |
* | fix(vim.ui.input): return empty string when inputs nothing (#20883)Jongwook Choi2022-11-08
| | | | | | | | | | | | | | | | | | | | | | fix(vim.ui.input): return empty string when inputs nothing The previous behavior of `vim.ui.input()` when typing <CR> with no text input (with an intention of having the empty string as input) was to execute `on_confirm(nil)`, conflicting with its documentation. Inputting an empty string should now correctly execute `on_confirm('')`. This should be clearly distinguished from cancelling or aborting the input UI, in which case `on_confirm(nil)` is executed as before.
* | vim-patch:9.0.0844: handling 'statusline' errors is spread out (#20992)luukvbaal2022-11-08
| | | | | | | | | | | | | | | | Problem: Handling 'statusline' errors is spread out. Solution: Pass the option name to the lower levels so the option can be reset there when an error is encountered. (Luuk van Baal, closes vim/vim#11467) https://github.com/vim/vim/commit/7b224fdf4a29f115567d4fc8629c1cef92d8444a
* | feat(api): add command name to Lua command callback optsFamiu Haque2022-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a `name` key to the opts dict passed to Lua command callbacks created using `nvim_create_user_command()`. This is useful for when multiple commands use the same callback. Note that this kind of behavior is not as strange as one might think, even some internal Neovim commands reuse the same internal C function, differing their behavior by checking the command name. `substitute`, `smagic` and `snomagic` are examples of that. This will also be useful for generalized Lua command preview functions that can preview a wide range of commands, in which case knowing the command name is necessary for the preview function to actually be able to execute the command that it's supposed to preview.
* | feat: ":write ++p" creates parent dirs #20835Victor Blanchard2022-11-06
| | | | | | | | | | | | | | | | | | | | | | - `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if they do not exist - Note: `:foo ++…` is usually for options. No existing options have a single-char abbreviation (presumably by design), so it's safe to special-case `++p` here. - Same for `writefile(…, 'foo/bar/baz.txt', 'p')` - `BufWriteCmd` can see the ++p flag via `v:cmdarg`. closes #19884
* | vim-patch:9.0.0756 #20680Shougo2022-11-06
|/ | | | | | Problem: No autocmd event for changing text in a terminal window. Solution: Add TextChangedT. (Shougo Matsushita, closes vim/vim#11366) https://github.com/vim/vim/commit/4ccaedfcd7526983f4b6b3b06b0bfb54f333f1f3
* feat(ui): add support to display a title in the border of a float (#20184)Raphael2022-11-06
| | | add "title" and "title_pos" keys to win config dict.
* fix(paste): feed keys as typed in cmdline mode (#20959)zeertzjq2022-11-06
|
* vim-patch:8.2.1106: crash when trying to use s: variable in typed commandzeertzjq2022-11-05
| | | | | | | | Problem: Crash when trying to use s: variable in typed command. Solution: Don't use the script index when not set. (Ken Takata, closes vim/vim#6366) https://github.com/vim/vim/commit/8e6cbb72324b6fb25d1a9abd6cc4d102d0e5f14e
* vim-patch:8.2.4501: with 'showbreak' set cursor displayed in wrong positionzeertzjq2022-11-05
| | | | | | | | | | Problem: With 'showbreak' set and after the end of the line the cursor may be displayed in the wrong position. Solution: Do not apply 'showbreak' after the end of the line. (closes vim/vim#9884) https://github.com/vim/vim/commit/21efafe4c25373929979c72dc8aafa119f12dd8b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0615: regexp benchmark stest is old style (#20940)zeertzjq2022-11-05
| | | | | | | | | | Problem: Regexp benchmark stest is old style. Solution: Make it a new style test. Fix using a NULL list. Add more tests. (Yegappan Lakshmanan, closes vim/vim#5963) https://github.com/vim/vim/commit/ad48e6c1590842ab6d48e6caba3e9250734dae27 N/A patches: vim-patch:9.0.0829: wrong counts in macro comment
* fix(fileio): use first available directory in backupdir for backupcopy (#20655)Will Spurgin2022-11-05
| | | | | | | | | | | | | | | Fix backups failing for symlink files Set backup to NULL prior to continuing & Clear backup prior to NULL set to avoid leaking Fixes #11349 Remove testing hacks in scripts for windows Skip FreeBSD Something appears up with these types of tests for FreeBSD on Circus, see 2d6735d8ce
* vim-patch:8.2.1022: various parts of code not covered by testszeertzjq2022-11-04
| | | | | | | | | | Problem: Various parts of code not covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#6300) https://github.com/vim/vim/commit/845e0ee59430eac07e74b6cb92020e420d17953d Omit test_iminsert.vim: the commit that created this file was N/A. Omit test_viminfo.vim: the added tests are N/A.
* vim-patch:8.2.0540: regexp and other code not tested (#20930)zeertzjq2022-11-04
| | | | | | Problem: Regexp and other code not tested. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5904) https://github.com/vim/vim/commit/004a6781b3cf15ca5dd632c38cc09bb3b253d1f8
* Enable new diff option linematch (#14537)Jonathon2022-11-04
| | | Co-authored-by: Lewis Russell <me@lewisr.dev>
* docs: fix typosdundargoc2022-11-02
|
* fix(mark): do not restore view in op-pending mode (#20889)zeertzjq2022-11-01
|
* feat(checkhealth): check runtime ($VIMRUNTIME)Justin M. Keyes2022-10-30
| | | | | | Move man/health.lua into the "runtime" check. fix #20696
* fix(mouse): ensure no scrolling with "ver:0" in 'mousescroll' (#20861)zeertzjq2022-10-30
|
* fix(path): don't remove trailing slash when getting absolute path (#20853)zeertzjq2022-10-30
| | | | | | Before Vim patch 8.2.3468 relative_directory is never used in the resulting path name, so whether it has a trailing slash didn't matter. Now path_full_dir_name() appends a non-existing relative directory to the current directory name, so the trailing slash needs to be kept.
* fix: avoid unsigned overflow in home_replace() (#20854)zeertzjq2022-10-30
|
* vim-patch:8.2.2653: build failurezeertzjq2022-10-27
| | | | | | | | | | | Problem: Build failure. Solution: Add missing changes. https://github.com/vim/vim/commit/3a0f092ac0dbdd4ce71f9c4abe020e89f13df36c Omit E1176: only applicable to Vim9 script. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.1852: map() returing zero for NULL list is unexpectedzeertzjq2022-10-26
| | | | | | | | | Problem: map() returing zero for NULL list is unexpected. Solution: Return the empty list. (closes vim/vim#7133) https://github.com/vim/vim/commit/ffdf8adfa8108d4765fdc68abbd2fe49a4292b25 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0610: some tests are still old stylezeertzjq2022-10-26
| | | | | | | | | | | Problem: Some tests are still old style. Solution: Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#5957) https://github.com/vim/vim/commit/08f4157c5cabc55bcb22f04dd7c717aba40caa34 Fix missing error message when sort() compare function fails. Cherry-pick a line in test_utf8.vim from patch 8.2.0448. Cherry-pick builtin_function() change from patch 8.2.0595.
* Merge pull request #20775 from shadmansaleh/fix/opt_tal_not_redrawing_tablinebfredl2022-10-24
|\ | | | | fix: setting tabline option not redrawing tabline
| * fix: setting tabline option not redrawing tablineshadmansaleh2022-10-24
| | | | | | | | | | | | | | | | | | With #20374 tabline option is marked with 'statuslines' redraw flag. But 'statuslines' doesn't redraw tabline. As a result, tabline doesn't get redrawn when tabline option is set and statuslines get unnecessarily redrawn. This patch fixes the issue by adding a new redraw flag P_RTABL to redraw tabline.
* | fix(lua): pesc, tbl_islist result types #20751NAKAI Tsuyoshi2022-10-24
| | | | | | | | | | | | | | | | | | | | | | | | Problem: - pesc() returns multiple results, it should return a single result. - tbl_islist() returns non-boolean in some branches. - Docstring: @generic must be declared first Solution: Constrain docstring annotations. Fix return types. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | test: add a test for a crash fixed by patch 8.2.0908zeertzjq2022-10-24
| |
* | docs: fix typos (#20724)dundargoc2022-10-23
| | | | | | Co-authored-by: Marco Lehmann <m99@posteo.de>
* | fix(ui): send grid_resize events before triggering VimResized (#20760)zeertzjq2022-10-22
|/
* docs: update vimdoc parser #20747Justin M. Keyes2022-10-20
| | | | | | | | | Remove the user-manual ToC from help.txt, because: 1. it duplicates usr_toc.txt 2. it is not what most readers are looking for in the main help page. fix https://github.com/neovim/tree-sitter-vimdoc/issues/49 fix https://github.com/neovim/tree-sitter-vimdoc/issues/50 fix https://github.com/neovim/tree-sitter-vimdoc/issues/51
* vim-patch:9.0.0739: mouse column not correctly used for popup_setpos (#20729)zeertzjq2022-10-19
| | | | | | | | Problem: Mouse column not correctly used for popup_setpos. Solution: Adjust off-by-one error and handle Visual line selection properly. (Yee Cheng Chin, closes vim/vim#11356) https://github.com/vim/vim/commit/17822c507c03d509037c9ee5eee5cfbb201b3f01 The test_termcodes.vim test cannot be used. Use a Lua test instead.
* feat(docs): update parser, HTML gen #20720Justin M. Keyes2022-10-18
| | | | | | | | | | Note: although the tolerance in help_spec.lua increased, the actual error count with the new parser decreased by about 20%. The difference is that the old ignore_parse_error() ignored many more errors with the old parser. fix https://github.com/neovim/tree-sitter-vimdoc/issues/37 fix https://github.com/neovim/tree-sitter-vimdoc/issues/44 fix https://github.com/neovim/tree-sitter-vimdoc/issues/47
* fix(intro): omit patch version in ":help news" item #20713zeertzjq2022-10-18
| | | | Because maintenance releases share the same news.txt as the last non-maintenance release.
* ci: add cirrus to isCI function to skip tests (#20526)dundargoc2022-10-17
| | | | The environment variable CIRRUS_CI is manually passed to RunTests.cmake as it doesn't get passed when using cmake script mode.
* test: add a test for #20684zeertzjq2022-10-17
|
* feat(api): nvim_select_popupmenu_item support cmdline pum (#20652)zeertzjq2022-10-17
|
* fix(man): handle absolute paths as `:Man` targets (#20624)Mahmoud Al-Qudsi2022-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix(man): handle absolute paths as :Man targets Previously, attempting to provide `:Man` with an absolute path as the name would cause neovim to return the following error: ``` Error detected while processing command line: /usr/local/share/nvim/runtime/lua/man.lua:690: /usr/local/share/nvim/runtime/lua/man.lua:683: Vim:E426: tag not found: nil(nil) Press ENTER or type command to continue ``` ..because it would try to validate the existence of a man page for the provided name by executing `man -w /some/path` which (on at least some Linux machines [0]) returns `/some/path` instead of the path to the nroff files that would be formatted to satisfy the man(1) lookup. While man pages are not normally named after absolute paths, users shouldn't be blamed for trying. Given such a name/path, neovim would **not** complain that the path didn't have a corresponding man file but would error out when trying to call the tag function for the null-propagated name-and-section `nil(nil)`. (The same underlying error existed before this function was ported to lua, but did not exhibit the lua-specific `nil(nil)` name; instead a tag lookup for `()` would fail and error out.) With this patch, we detect the case where `man -w ...` returns the same value as the provided name to not only prevent invoking the tag function for a non-existent/malformed name+sect but also to properly report the non-existence of a man page for the provided lookup (the absolute path). While man(1) can be used to directly read an nroff-formatted document via `man /path/to/nroff.doc`, `:Man /path/to/nroff.doc` never supported this behavior so no functionality is lost in case the provided path _was_ an nroff file. [0]: `man -w /absolute/path` returning `/absolute/path` observed on an Ubuntu 18.04 installation. * test: add regression test for #20624 Add a functional test to `man_spec.lua` to check for a regression for #20624 by first obtaining an absolute path to a random file and materializing it to disk, then attempting to query `:Man` for an entry by that same name/path. The test passes if nvim correctly reports that there is no man page correspending to the provided name/path and fails if any other error (or no error) is shown.
* Merge pull request #20665 from lewis6991/fix/decor_redrawLewis Russell2022-10-17
|\
| * fix(decoration): call providers in win_update() earlierLewis Russell2022-10-15
| | | | | | | | Fixes #20651
* | vim-patch:3c053a1a5ad2 (#20679)Christian Clason2022-10-17
| | | | | | | | Update runtime files https://github.com/vim/vim/commit/3c053a1a5ad2a3c924929e11f2b9af20a8b901e2