Problem: Using channel or job with ":execute" has strange effects.
Solution: Give an error message for Job and Channel.
b662591e50
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Using null object with execute() has strange effects.
Solution: Give an error message ofr Job and Channel.
e2a8f0773e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Messages test fails in small version.
Solution: Only use test_null_job() when available.
da292b07af
Co-authored-by: Bram Moolenaar <Bram@vim.org>
It takes a significant amount of time to install neovim, and doubly so
on Windows, due to the sheer amount of files neovim ships with. On CI
this information may be important though, so we enable it if the
CI_ENABLE option is set to ON.
Problem: Vim9: line break in expression causes v:errmsg to be filled.
(Yegappan Lakshmanan)
Solution: Do not give an error when skipping over an expression.
5e6b9882fe
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: "exit_cb" causes Vim to exit.
Solution: Require white space after a command in Vim9 script. (closesvim/vim#7467)
Also fix that Vim9 style heredoc was not always recognized.
b5b9480ee9
Omit EX_NONWHITE_OK, E1143, E1144: Vim9 script only.
Cherry-pick test_vimscript.vim changes from patch 8.2.2141.
Cherry-pick E1145 tag from Vim runtime.
N/A patches for version.c:
vim-patch:8.2.2140: build failure with tiny features
Problem: Build failure with tiny features.
Solution: Add #ifdef.
2a3cd3af45
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Inconsistent naming of get_list_tv() and eval_dict().
Solution: Rename get_list_tv() to eval_list(). Similarly for eval_number(),
eval_string(), eval_lit_string() and a few others.
9a78e6df17
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No falsy Coalescing operator.
Solution: Add the "??" operator. Fix mistake with function argument count.
92f26c256e
Cherry-pick tv2bool() into eval/typval.c.
Cherry-pick *??* tag from Vim runtime.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
feat(lua)!: add stricter vim.tbl_islist(), rename vim.tbl_isarray()
Problem: `vim.tbl_islist` allows gaps in tables with integer keys
("arrays").
Solution: Rename `vim.tbl_islist` to `vim.tbl_isarray`, add new
`vim.tbl.islist` that checks for consecutive integer keys that start
from 1.
Problem: Vim9: line continuation in lambda doesn't always work.
Solution: Do not use a local evalarg unless there isn't one. (closesvim/vim#6439)
8af81d656a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(lua): vim.tbl_contains supports general tables and predicates
Problem: `vim.tbl_contains` only works for list-like tables (integer
keys without gaps) and primitive values (in particular, not for nested
tables).
Solution: Rename `vim.tbl_contains` to `vim.list_contains` and add new
`vim.tbl_contains` that works for general tables and optionally allows
`value` to be a predicate function that is checked for every key.
Problem: Vim9: crash when using variable in a loop at script level.
Solution: Do not clear the variable if a function was defined.
Do not create a new entry in sn_var_vals every time.
(closesvim/vim#8628)
2eb6fc3b52
Omit eval_cstack: Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: double quote can be a string or a comment.
Solution: Only support comments starting with # to avoid confusion.
962d721319
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: line continuation does not work in function arguments.
Solution: Pass "evalarg" to get_func_tv(). Fix seeing double quoted string
as comment.
e6b5324e3a
Omit skipwhite_and_linebreak_keep_string(): Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: cannot use line break in :execute, :echomsg and :echoerr
argument.
Solution: Check for line break.
47e880d6c1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no line break allowed in a for loop.
Solution: Skip line breaks in for command.
b7a78f7a67
Omit *_break_count and skip_for_lines(): Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no line break allowed in a while loop.
Solution: Update stored loop lines when finding line breaks.
d5053d015a
Omit getline_peek(): Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no line break allowed after some operators.
Solution: Skip a line break after the operator. Add
eval_may_get_next_line() to simplify checking for a line break.
9215f01218
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no line break allowed inside a lambda.
Solution: Handle line break inside a lambda in Vim9 script.
e40fbc2ca9
Omit skip_expr_concatenate(). Apply the change to skip_expr() instead.
Omit eval_ga: Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: fail to check for white space in list.
Solution: Add check for white space.
e6e031739c
N/A patches for version.c:
vim-patch:8.2.1070: Vim9: leaking memory when lacking white space in dict
Problem: Vim9: leaking memory when lacking white space in dict.
Solution: Clear the typval.
ab19d495fd
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no line break allowed inside a dict.
Solution: Handle line break inside a dict in Vim9 script.
8ea9390b78
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no line break allowed inside a list.
Solution: Handle line break inside a list in Vim9 script.
7147820cb9
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no line break allowed before comperators.
Solution: Check for comperator after line break.
e6536aa766
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no line break allowed before || or &&.
Solution: Check for operator after line break.
be7ee48876
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no line break allowed inside "cond ? val1 : val2".
Solution: Check for operator after line break.
793648fb56
Co-authored-by: Bram Moolenaar <Bram@vim.org>