Bram Moolenaar
dc3e2e65c9
patch 8.2.2835: Vim9: leaking memory in :cexpr
...
Problem: Vim9: leaking memory in :cexpr.
Solution: Also free the command line copy.
2021-05-05 22:40:56 +02:00
Bram Moolenaar
5f7d4c049e
patch 8.2.2834: Vim9: :cexpr does not work with local variables
...
Problem: Vim9: :cexpr does not work with local variables.
Solution: Compile :cexpr.
2021-05-05 21:31:39 +02:00
Bram Moolenaar
dc4c2309f2
patch 8.2.2809: Vim9: :def function compilation fails when using :legacy
...
Problem: Vim9: :def function compilation fails when using :legacy.
Solution: Reset CMOD_LEGACY when compiling a function. (closes #8137 )
2021-04-25 13:54:42 +02:00
Bram Moolenaar
bdc0f1c698
patch 8.2.2806: Vim9: using "++nr" as a command might not work
...
Problem: Vim9: using "++nr" as a command might not work.
Solution: Do not recognize "++" and "--" in a following line as addition or
subtraction.
2021-04-24 19:08:24 +02:00
Bram Moolenaar
96cf4ba8fb
patch 8.2.2805: Vim9: cannot use legacy syntax in Vim9 script
...
Problem: Vim9: cannot use legacy syntax in Vim9 script.
Solution: Add the :legacy command.
2021-04-24 14:15:41 +02:00
Bram Moolenaar
a369c3d9c1
patch 8.2.2798: Vim9: redir to variable with append does not accept an index
...
Problem: Vim9: redir to variable with append does not accept an index.
Solution: Make the appending work.
2021-04-21 16:00:10 +02:00
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