| Commit message (Collapse) | Author | Age |
... | |
|\ \
| | |
| | | |
fix(ui-ext): correct message kind in history before vim.ui_attach()
|
| | | |
|
| | |
| | |
| | | |
Prevent Ctrl-C from flushing the command that starts the prompt.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#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>
|
| |
| |
| |
| |
| | |
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(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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- `: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
|
|/
|
|
|
|
| |
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
|
|
|
| |
add "title" and "title_pos" keys to win config dict.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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 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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Problem: Regexp and other code not tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5904)
https://github.com/vim/vim/commit/004a6781b3cf15ca5dd632c38cc09bb3b253d1f8
|
|
|
| |
Co-authored-by: Lewis Russell <me@lewisr.dev>
|
| |
|
| |
|
|
|
|
|
|
| |
Move man/health.lua into the "runtime" check.
fix #20696
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
fix: setting tabline option not redrawing tabline
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | |
|
| |
| |
| | |
Co-authored-by: Marco Lehmann <m99@posteo.de>
|
|/ |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Because maintenance releases share the same news.txt as the last
non-maintenance release.
|
|
|
|
| |
The environment variable CIRRUS_CI is manually passed to RunTests.cmake
as it doesn't get passed when using cmake script mode.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|\ |
|
| |
| |
| |
| | |
Fixes #20651
|
| |
| |
| |
| | |
Update runtime files
https://github.com/vim/vim/commit/3c053a1a5ad2a3c924929e11f2b9af20a8b901e2
|