Bram Moolenaar
753bcf8c7d
patch 8.2.2796: Vim9: redir to variable does not accept an index
...
Problem: Vim9: redir to variable does not accept an index.
Solution: Make the index work.
2021-04-21 14:24:24 +02:00
Bram Moolenaar
169502fb0b
patch 8.2.2795: Coverity warns for not using return value
...
Problem: Coverity warns for not using return value.
Solution: Check the return value of compiling the substitute expression.
2021-04-21 12:19:35 +02:00
Bram Moolenaar
5c787fb792
patch 8.2.2791: Vim9: memory leak when using \=expr in :substitute
...
Problem: Vim9: memory leak when using \=expr in :substitute.
Solution: Do not allocate a new instruction list.
2021-04-20 21:49:35 +02:00
Bram Moolenaar
8238f08838
patch 8.2.2789: Vim9: using \=expr in :substitute does not handle jumps
...
Problem: Vim9: using \=expr in :substitute does not handle jumps.
Solution: Start with instruction count zero. (closes #8128 )
2021-04-20 21:10:48 +02:00
Bram Moolenaar
4f2df37a0d
patch 8.2.2786: Vim9: memory leak when using :s with expression
...
Problem: Vim9: memory leak when using :s with expression.
Solution: Clean up the instruction list.
2021-04-19 21:06:31 +02:00
Bram Moolenaar
2d1c57ed3d
patch 8.2.2785: Vim9: cannot redirect to local variable
...
Problem: Vim9: cannot redirect to local variable.
Solution: Compile :redir when redirecting to a variable.
2021-04-19 20:50:03 +02:00
Bram Moolenaar
4c13721482
patch 8.2.2784: Vim9: cannot use \=expr in :substitute
...
Problem: Vim9: cannot use \=expr in :substitute.
Solution: Compile the expression into instructions and execute them when
invoked.
2021-04-19 16:48:48 +02:00
Bram Moolenaar
d551d6c268
patch 8.2.2780: Vim9: for loop over blob doesn't work
...
Problem: Vim9: for loop over blob doesn't work.
Solution: Make it work.
2021-04-18 13:15:58 +02:00
Bram Moolenaar
51e933261b
patch 8.2.2777: Vim9: blob operations not tested in all ways
...
Problem: Vim9: blob operations not tested in all ways.
Solution: Run tests with CheckLegacyAndVim9Success(). Make blob assign with
index work.
2021-04-17 20:44:56 +02:00
Bram Moolenaar
c70fe460b0
patch 8.2.2775: Vim9: wrong line number used for some commands
...
Problem: Vim9: wrong line number used for some commands.
Solution: For :exe, :echo and the like use the line number of the start of
the command. When calling a function set the line number in the
script context.
2021-04-17 17:59:19 +02:00
Bram Moolenaar
fe090eb58f
patch 8.2.2770: Vim9: type of loop variable is not used
...
Problem: Vim9: type of loop variable is not used.
Solution: Parse and check the variable type. (closes #8107 )
2021-04-15 21:48:32 +02:00
Bram Moolenaar
f387f5dfbc
patch 8.2.2768: Vim9: memory leak with blob range error
...
Problem: Vim9: memory leak with blob range error.
Solution: Jump to end instead of returning.
2021-04-15 13:42:21 +02:00
Bram Moolenaar
b141926890
patch 8.2.2766: test failure
...
Problem: Test failure.
Solution: Add change to Vim9 compilation error message.
2021-04-14 20:54:07 +02:00
Bram Moolenaar
f62d73933a
patch 8.2.2762: Vim9: function line truncated when compiling
...
Problem: Vim9: function line truncated when compiling.
Solution: Copy the line before processing it. (closes #8101 )
2021-04-14 12:40:00 +02:00
Bram Moolenaar
f6a8d420a8
patch 8.2.2760: Vim9: no error for changing a for loop variable
...
Problem: Vim9: no error for changing a for loop variable.
Solution: Make the loop variable read-only. (issue #8102 )
2021-04-13 21:48:03 +02:00
Bram Moolenaar
68452177ca
patch 8.2.2757: Vim9: blob tests for legacy and Vim9 script are separate
...
Problem: Vim9: blob tests for legacy and Vim9 script are separate.
Solution: Add CheckLegacyAndVim9Success(). Make blob index assign work.
2021-04-12 21:21:02 +02:00
Bram Moolenaar
cfc3023cb6
patch 8.2.2756: Vim9: blob index and slice not implemented yet
...
Problem: Vim9: blob index and slice not implemented yet.
Solution: Implement blob index and slice.
2021-04-11 20:26:34 +02:00
Bram Moolenaar
af8ea0d066
patch 8.2.2755: Vim9: no error for using a number in a condition
...
Problem: Vim9: no error for using a number in a condition.
Solution: Also use ISN_COND2BOOL if the type is t_number_bool.
(closes #7644 )
2021-04-11 18:24:46 +02:00
Bram Moolenaar
f93bbd0262
patch 8.2.2753: Vim9: cannot ignore an item in assignment unpack
...
Problem: Vim9: cannot ignore an item in assignment unpack.
Solution: Allow using an underscore.
2021-04-10 22:35:43 +02:00
Bram Moolenaar
da479c7597
patch 8.2.2750: Vim9: error for using underscore in nested function
...
Problem: Vim9: error for using underscore in nested function.
Solution: Do not consider "_" already defined. (closes #8096 )
2021-04-10 21:01:38 +02:00
Bram Moolenaar
962c43bf0d
patch 8.2.2744: Vim9: no way to explicitly ignore an argument
...
Problem: Vim9: no way to explicitly ignore an argument.
Solution: Use the underscore as the name for an ignored argument.
2021-04-10 17:18:09 +02:00
Bram Moolenaar
599410cb3c
patch 8.2.2743: Vim9: function state stuck when compiling with ":silent!"
...
Problem: Vim9: function state stuck when compiling with ":silent!".
Solution: Check for uf_def_status to be UF_COMPILING.
2021-04-10 14:03:43 +02:00
Bram Moolenaar
701cc6ca9e
patch 8.2.2742: Vim9: when compiling a function fails it is cleared
...
Problem: Vim9: when compiling a function fails it is cleared.
Solution: Keep the function lines, prevent execution with a different
status. (closes #8093 )
2021-04-10 13:33:48 +02:00
Bram Moolenaar
1088b69451
patch 8.2.2741: Vim9: Partial call does not check right arguments
...
Problem: Vim9: Partial call does not check right arguments.
Solution: Adjust the offset for whether the partial is before or after the
arguments. (closes #8091 )
2021-04-09 22:12:44 +02:00
Bram Moolenaar
2a38908b05
patch 8.2.2740: Vim9: lambda with varargs doesn't work
...
Problem: Vim9: lambda with varargs doesn't work.
Solution: Make "...name" work. Require type to be a list.
2021-04-09 20:24:31 +02:00
Bram Moolenaar
fa5963880d
patch 8.2.2735: Vim9: function reference found with prefix, not without
...
Problem: Vim9: function reference found with prefix, not without.
Solution: Also find function reference without prefix.
2021-04-07 21:58:16 +02:00
Bram Moolenaar
15e5e53ef2
patch 8.2.2734: Vim9: cannot use legacy script-local var from :def function
...
Problem: Vim9: cannot use legacy script-local var from :def function.
Solution: Do not insist on using "s:" prefix. (closes #8076 )
2021-04-07 21:21:13 +02:00
Bram Moolenaar
c9605f0595
patch 8.2.2730: Coverity complains about not restoring character
...
Problem: Coverity complains about not restoring character.
Solution: Also restore the character in case of an error.
2021-04-06 21:29:32 +02:00
Bram Moolenaar
643ce6c0c6
patch 8.2.2729: Vim9: wrong error message for referring to legacy script var
...
Problem: Vim9: wrong error message for referring to legacy script variable.
Solution: Do allow referring to a variable in legacy script without "s:" if
it exists at compile time. (closes #8076 )
2021-04-06 21:17:27 +02:00
Bram Moolenaar
b9c0cd897a
patch 8.2.2722: Vim9: crash when using LHS with double index
...
Problem: Vim9: crash when using LHS with double index.
Solution: Handle lhs_dest which is "dest_expr". (closes #8068 )
Fix confusing error message for missing dict item.
2021-04-05 20:51:00 +02:00
Bram Moolenaar
2927c07b0e
patch 8.2.2721: Vim9: cannot have a linebreak inside a lambda
...
Problem: Vim9: cannot have a linebreak inside a lambda.
Solution: Compile the expression before the arguments.
2021-04-05 19:41:21 +02:00
Bram Moolenaar
e42939af87
patch 8.2.2719: Vim9: appending to dict item doesn't work in a :def function
...
Problem: Vim9: appending to dict item doesn't work in a :def function.
Solution: Implement assignment with operator on indexed item.
2021-04-05 17:11:17 +02:00
Bram Moolenaar
90193e6140
patch 8.2.2710: Vim9: not all tests cover script and :def function
...
Problem: Vim9: not all tests cover script and :def function.
Solution: Run tests in both if possible. Fix differences.
2021-04-04 20:49:50 +02:00
Bram Moolenaar
a7511c0f4f
patch 8.2.2706: Vim9: wrong line number reported for boolean operator
...
Problem: Vim9: wrong line number reported for boolean operator.
Solution: Use the line number before skipping over line break.
(closes #8058 )
2021-04-03 21:47:07 +02:00
Bram Moolenaar
77709b194c
patch 8.2.2705: Vim9: misleading reported line number for wrong type
...
Problem: Vim9: misleading reported line number for wrong type.
Solution: Remember and use the line number at the start. (closes #8059 )
2021-04-03 21:01:01 +02:00
Bram Moolenaar
ca51cc0a33
patch 8.2.2688: Vim9: crash when using s: for script variable
...
Problem: Vim9: crash when using s: for script variable.
Solution: Pass the end pointer. (closes #8045 )
2021-04-01 21:38:53 +02:00
Bram Moolenaar
d877a5700f
patch 8.2.2687: Vim9: cannot use "const" for global variable in :def function
...
Problem: Vim9: cannot use "const" for global variable in :def function.
Solution: Do allow using :const for a global variable. (closes #8030 )
2021-04-01 19:42:48 +02:00
Bram Moolenaar
529fb5a5f6
patch 8.2.2682: Vim9: cannot find Name.Func from "import * as Name"
...
Problem: Vim9: cannot find Name.Func from "import * as Name". (Alexander
Goussas)
Solution: When no variable found try finding a function. (closes #8045 )
Check that the function was exported.
2021-04-01 12:57:57 +02:00
Bram Moolenaar
38a3bfa9a2
patch 8.2.2677: Vim9: cannot use only some of the default arguments
...
Problem: Vim9: cannot use only some of the default arguments.
Solution: Use v:none to use default argument value. Remove
uf_def_arg_idx[], use JUMP_IF_ARG_SET. (closes #6504 )
2021-03-29 22:14:55 +02:00
Bram Moolenaar
b2cb6c8bbd
patch 8.2.2672: Vim9: cannot use :lockvar and :unlockvar in compiled script
...
Problem: Vim9: cannot use :lockvar and :unlockvar in compiled script.
Solution: Implement locking support.
2021-03-28 20:38:34 +02:00
Bram Moolenaar
74e54fcb44
patch 8.2.2658: :for cannot loop over a string
...
Problem: :for cannot loop over a string.
Solution: Accept a string argument and iterate over its characters.
2021-03-26 20:41:29 +01:00
Bram Moolenaar
fa984418e7
patch 8.2.2652: Vim9: can use command modifier without an effect
...
Problem: Vim9: can use command modifier without an effect.
Solution: Give an error for a misplaced command modifier. Fix error message
number.
2021-03-25 22:15:28 +01:00
Bram Moolenaar
a91a71322d
patch 8.2.2651: Vim9: restoring command modifiers happens after jump
...
Problem: Vim9: restoring command modifiers happens after jump.
Solution: Move the restore instruction to before the jump. (closes #8006 )
Also handle for and while.
2021-03-25 21:12:15 +01:00
Bram Moolenaar
67da21a147
patch 8.2.2636: memory leak when compiling inline function
...
Problem: Memory leak when compiling inline function.
Solution: Free the prefetched line.
2021-03-21 22:12:34 +01:00
Bram Moolenaar
7a6eaa06f9
patch 8.2.2635: Vim9: cannot define an inline function
...
Problem: Vim9: cannot define an inline function.
Solution: Make an inline function mostly work.
2021-03-21 20:53:29 +01:00
Bram Moolenaar
4b3e1964d8
patch 8.2.2620: Vim9: Using #{ for a dictionary gives strange errors
...
Problem: Vim9: Using #{ for a dictionary gives strange errors.
Solution: Give an error when using #{ for a comment after a command.
2021-03-18 21:37:55 +01:00
Bram Moolenaar
3f32788000
patch 8.2.2618: Vim9: cannot use a normal list name to store function refs
...
Problem: Vim9: cannot use a normal list name to store function refs.
Solution: Allow a lower case name if it is indexed.
2021-03-17 20:56:38 +01:00
Bram Moolenaar
8863bda25d
patch 8.2.2617: Vim9: script variable in block not found by function
...
Problem: Vim9: script variable in a block scope not found by a nested
function.
Solution: Copy the block scope IDs before compiling the function.
2021-03-17 18:42:08 +01:00
Bram Moolenaar
77b10ffad4
patch 8.2.2603: Vim9: no effect if user command is also a function
...
Problem: Vim9: no effect if user command is also a function.
Solution: Check for paren following. (closes #7960 )
2021-03-14 13:21:35 +01:00
Bram Moolenaar
edba70703b
patch 8.2.2599: build failure
...
Problem: Build failure.
Solution: Add missing change.
2021-03-13 21:14:18 +01:00