| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Builtin function can be shadowed by global variable.
Solution: Check for builtin function before variable. (Yasuhiro Matsumoto,
closes vim/vim#8302)
https://github.com/vim/vim/commit/3d9c4eefe656ee8bf58c0496a48bd56bac180056
Cherry-pick Test_gettext() from patch 8.2.2886.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Confusing error when expression is followed by comma.
Solution: Give a different error for trailing text. (closes vim/vim#8395)
https://github.com/vim/vim/commit/fae55a9cb0838e4c2e634e55a3468af4a75fbdf2
Omit test_eval_stuff.vim and test_viminfo.vim: changes tests are N/A.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: crash when using LHS with double index.
Solution: Handle lhs_dest which is "dest_expr". (closes vim/vim#8068)
Fix confusing error message for missing dict item.
https://github.com/vim/vim/commit/b9c0cd897ab4ad54f514187e89719c0241393f8b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Checking for first character of dict key is inconsistent.
Solution: Add eval_isdictc(). (closes vim/vim#6546)
https://github.com/vim/vim/commit/b13ab99908097d54e21ab5adad22f4ad2a8ec688
Omit handle_subscript() change: only affects Vim9 script.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: no error for missing white space in assignment at script
level.
Solution: Check for white space. (closes vim/vim#6495)
https://github.com/vim/vim/commit/63be3d4ba01d565e645d8bf7f4dc900fc9011534
Cherry-pick Test_let_errors() change from patch 8.2.0633.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: wrong argument for append() results in two errors.
Solution: Check did_emsg. Also for setline(). Adjust the help for
appendbufline().
https://github.com/vim/vim/commit/8b6256f6ec075cca40341e61ebc9f538b4902dd1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: assert_fails() checks the last error message.
Solution: Check the first error, it is more relevant. Fix all the tests
that rely on the old behavior.
https://github.com/vim/vim/commit/9b7bf9e98f06ece595fed7a3ff53ecce89797a53
Skip test_listener.vim, test_textprop.vim, test_viminfo.vim.
Skip test_python2.vim: affected line fails and hasn't been ported.
Skip test_python3.vim: affected lines fail and haven't been ported.
Skip CHECK_LIST_MATERIALIZE.
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
|
| | |
|
| |
| |
| |
| |
| | |
Uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
See also https://github.com/neovim/neovim/pull/18563
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: no error if declaring a funcref with a lower case letter.
Solution: Check the name after the type is inferred. Fix confusing name.
https://github.com/vim/vim/commit/98b4f145eb89405021e23a4a37db51d60a75a1d0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Recursion test fails with MSVC.
Solution: Use a smaller limit for MSVC.
https://github.com/vim/vim/commit/50e05254450954f04183efc7bc871527a67868b8
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Condition with many "(" causes a crash.
Solution: Limit recursion to 1000.
https://github.com/vim/vim/commit/fe6fb267e6ee5c5da2f41889e4e0e0ac5bf4b89d
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: Null dict is not handled like an empty dict.
Solution: Fix the code and add tests. (Yegappan Lakshmanan, closes vim/vim#5968)
https://github.com/vim/vim/commit/ea04a6e8baff2f27da7cdd54bf70a5525994f76d
Nvim doesn't support modifying NULL list, so comment out a line.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* refactor: readability-uppercase-literal-suffix
* refactor: readability-named-parameter
* refactor: bugprone-suspicious-string-compare
* refactor: google-readability-casting
* refactor: readability-redundant-control-flow
* refactor: bugprone-too-small-loop-variable
* refactor: readability-non-const-parameter
* refactor: readability-avoid-const-params-in-decls
* refactor: google-readability-todo
* refactor: readability-inconsistent-declaration-parameter-name
* refactor: bugprone-suspicious-missing-comma
* refactor: remove noisy or slow warnings
|
| |
| |
| |
| |
| |
| | |
Problem: Crash when trying to divice the largest negative number by -1.
Solution: Handle this case specifically.
https://github.com/vim/vim/commit/cdef1cefa2a440911c727558562f83ed9b00e16b
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Wrong column when calling setcursorcharpos() with zero lnum.
Solution: Set the line number before calling buf_charidx_to_byteidx().
(closes vim/vim#11329)
https://github.com/vim/vim/commit/79f234499b6692cc16970b7455bc9b002242632f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replaces unnecessary helper functions in `optionstr.c` such as
`get_option_flags()`, `get_option_fullname()`, `set_option_flag()`,
`is_global_option()`, etc. with a single `get_option()` helper function
that allows direct access to the `options` array.
Also refactors `f_exists()` to use `get_varp_scope` instead of using
`get_option_tv`. This opens up the path for removing `getoptions_T`
altogether later down the line since the hidden option logic is no
longer needed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#20214)
Problem: The funcexe_T struct members are not named consistently.
Solution: Prefix "fe_" to all the members.
https://github.com/vim/vim/commit/851f86b951cdd67ad9cf3149e46169d1375c8d82
Omit fe_check_type: always NULL in legacy Vim script.
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| | |
Problem: #{g:x} was seen as a curly-braces expression.
Solution: Do never see #{} as a curly-braces expression. (closes vim/vim#11075)
https://github.com/vim/vim/commit/7c7e1e9b98d4e5dbe7358c795a635c6f1f36f418
|
| |
| |
| |
| |
| |
| | |
Problem: First key in dict is seen as curly expression and fails.
Solution: Ignore failure of curly expression. (closes vim/vim#9247)
https://github.com/vim/vim/commit/98cb90ef865089a5ddd20bc0303d449fb7d97fb2
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |\
| | |
| | | |
refactor: replace char_u with char 6
|
| | |
| | |
| | |
| | | |
Work on https://github.com/neovim/neovim/issues/459
|
| |\ \
| | |/
| |/| |
feat(lua): vim.ui_attach to get ui events from lua
|
| | |
| | |
| | |
| | | |
Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
|
| |/
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`!did_throw` doesn't exactly imply `!current_exception`, as `did_throw = false`
is sometimes used to defer exception handling for later (without forgetting the
exception). E.g: uncaught exception handling in `do_cmdline()` may be deferred
to a different call (e.g: when `try_level > 0`).
In #7881, `current_exception = NULL` in `do_cmdline()` is used as an analogue of
`did_throw = false`, but also causes the pending exception to be lost, which
also leaks as `discard_exception()` wasn't used.
It may be possible to fix this by saving/restoring `current_exception`, but
handling all of `did_throw`'s edge cases seems messier. Maybe not worth
diverging over.
This fix also uncovers a `man_spec.lua` bug on Windows: exceptions are thrown
due to Windows missing `man`, but they're lost; skip these tests if `man` isn't
executable.
|
| |
| |
| |
| |
| |
| |
| | |
* refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Language and locale code spread out.
Solution: Move relevant code to src/locale.c. (Yegappan Lakshmanan,
closes vim/vim#6509)
https://github.com/vim/vim/commit/054f14bbe58fece17f1a74ca63f0b37518f0b4de
Also remove redundant <locale.h> includes.
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| | |
|
| |\
| | |
| | | |
perf(api): allow to use an arena for return values
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
In non-multigrid UI the only change is that the returned height now
excludes winbar, and this is compatible with Vim.
In multigrid UI this means the return value of these functions now
reflect the space available for buffer lines in a window.
No change in nvim_win_get_height() and nvim_win_get_width().
|
| |
| |
| |
| |
| | |
Problem: Error from setting an option is silently ignored.
Solution: Handle option value errors better. Fix uses of N_().
https://github.com/vim/vim/commit/31e5c60a682840959cae6273ccadd9aae48c928d
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: 'cpo' can become empty.
Solution: Use empty_option instead of an empty string. Update quickfix
buffer after restoring 'cpo'. (closes vim/vim#7608)
https://github.com/vim/vim/commit/e5a2dc87fd9d63dfd0d9c379e363ee8b8c05b14c
Omit test as it is Vim9 script.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change unlocks additional registers for Neovim by allowing a user
to define their own behavior for non-builtin registers.
This is accopmlished through a new option 'userregfunc'
The 'userregfunc' defines the function to call when handling a register
for which there is no builtin functionality.
The 'userregfunc' function should take 3 arguments:
action - Either "yank" or "put"
register - The character corresponding to the register
content - In the case of action == "yank", the dictionary describing
the yanked content, with the following keys:
{type} - Either "char", "line" or "block"
{lines} - The lines being yanked as a list
{width} - The width in case of "block" mode.
{additional_data} - Additional data (can be returned in
"put" mode)
In case of "put" this function should return the content to put. This
content can be either:
* A dictionary in the same template as content above.
* A list of strings. This will be assumed to be "line" mode.
* A string. This will be assumed to be "char" mode.
An example of a "null" 'userregfunc' that provides an implementation
identical to traditional vim registers would be:
let s:contents = {}
function! MyUserregFunction(action, register, content) abort
if a:action == "put"
return get(s:contents, a:register, "")
else
let s:contents[a:register] = a:content
endif
endfunction
set userregfun=MyUserregFunction
It is important to note that any valid unicode character can now be a
register, including something like @☺.
This change also addresses the multibyte parsing issues surrounding
let @a = 'xyz'
let @🔨 = 'hammer'
|
|
|
|
|
| |
Problem: Command line expansion code is spread out.
Solution: Move the code to cmdexpand.c. (Yegappan Lakshmanan, closes vim/vim#4831)
https://github.com/vim/vim/commit/66b51420e0c8d49bcf6786b792c938d6099e3393
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The option.c file is too big.
Solution: Split off the code dealing with strings. (Yegappan Lakshmanan,
closes vim/vim#4937)
https://github.com/vim/vim/commit/dac1347b4d9c1a1aef6aa73fdea08a9d1077d6ea
Cherry-pick set_string_option_direct_in_win() from patch 8.1.1405.
Cherry-pick shift_line() comment change from patch 8.1.2096.
Move 'clipboard' default parsing to didset_string_options().
Reorder option flags to put Nvim-only flags at the end.
|