Problem: Interpolated string expression requires escaping.
Solution: Do not require escaping in the expression.
0abc2871c1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: String interpolation only works in heredoc.
Solution: Support interpolated strings. Use syntax for heredoc consistent
with strings, similar to C#. (closesvim/vim#10327)
2eaef106e4
Cherry-pick Test_Debugger_breakadd_expr() from Vim.
Co-authored-by: LemonBoy <thatlemon@gmail.com>
Problem: Heredoc expression evaluated even when skipping.
Solution: Don't evaluate when "skip" is set. (closesvim/vim#10306)
05c7f5d3d0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests.
Solution: Run more expression tests also with Vim9. Fix an uncovered
problem.
fea43e44c0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cannot put space between function name and paren.
Solution: Allow this for backwards compatibility.
bbd3e3c357
This fixes a regression from patch 8.2.1365, which isn't ported yet.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: v_lock not set when getting value of environment variable.
Solution: Set v_lock to zero.
16e63e6d35
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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>