Bram Moolenaar
00b28d6c23
patch 9.0.1031: Vim9 class is not implemented yet
...
Problem: Vim9 class is not implemented yet.
Solution: Add very basic class support.
2022-12-08 15:32:33 +00:00
Bram Moolenaar
ef2c325f5e
patch 9.0.0949: crash when unletting a variable while listing variables
...
Problem: Crash when unletting a variable while listing variables.
Solution: Disallow changing a hashtable while going over the entries.
(closes #11435 )
2022-11-25 16:31:51 +00:00
Bram Moolenaar
398a26f7fc
patch 9.0.0875: using freed memory when executing delfunc at more prompt
...
Problem: Using freed memory when executing delfunc at the more prompt.
Solution: Check function list not changed in another place. (closes #11437 )
2022-11-13 22:13:33 +00:00
dundargoc
c57b5bcd22
patch 9.0.0828: various typos
...
Problem: Various typos.
Solution: Correct typos. (closes #11432 )
2022-11-02 13:30:51 +00:00
Bram Moolenaar
87b4e5c5db
patch 9.0.0632: calling a function from an "expr" option has overhead
...
Problem: Calling a function from an "expr" option has too much overhead.
Solution: Add call_simple_func() and use it for 'foldexpr'
2022-10-01 15:32:46 +01:00
Bram Moolenaar
cfb4d4f312
patch 9.0.0630: in Vim9 script a numbered function cannot be called
...
Problem: In Vim9 script a numbered function cannot be called.
Solution: Do not require "g:" before a numbered function name.
(closes #11254 )
2022-09-30 19:19:04 +01:00
Yegappan Lakshmanan
e9dcf13a30
patch 9.0.0568: autocmd code is indented more than needed
...
Problem: Autocmd code is indented more than needed.
Solution: Break out sooner. (Yegappan Lakshmanan, closes #11208 )
Also in user function code.
2022-09-24 11:30:41 +01:00
Bram Moolenaar
f5f4e85f01
patch 9.0.0553: no error for "|" after "{" in lamda
...
Problem: No error for "|" after "{" in lamda.
Solution: Check for invalid "|". (closes #11199 )
2022-09-22 22:03:14 +01:00
Bram Moolenaar
cc34181f99
patch 9.0.0502: a closure in a nested loop in a :def function does not work
...
Problem: A closure in a nested loop in a :def function does not work.
Solution: Use an array of loopvars, one per loop level.
2022-09-19 15:54:34 +01:00
Bram Moolenaar
8fa745e7be
patch 9.0.0481: in :def function all closures in loop get the same variables
...
Problem: In a :def function all closures in a loop get the same variables.
Solution: Use a separate list of variables for LOADOUTER and STOREOUTER.
Not copied at end of loop yet.
2022-09-16 19:04:24 +01:00
zeertzjq
48db5dafec
patch 9.0.0476: varargs does not work for replacement function of substitute()
...
Problem: Varargs does not work for replacement function of substitute().
Solution: Check the varargs flag of the function. (closes #11142 )
2022-09-16 12:10:03 +01:00
Bram Moolenaar
169003289f
patch 9.0.0419: the :defer command does not check the function arguments
...
Problem: The :defer command does not check the function argument count and
types.
Solution: Check the function arguments when adding a deferred function.
2022-09-08 19:51:45 +01:00
Bram Moolenaar
6f14da15ac
patch 9.0.0411: only created files can be cleaned up with one call
...
Problem: Only created files can be cleaned up with one call.
Solution: Add flags to mkdir() to delete with a deferred function.
Expand the writefile() name to a full path to handle changing
directory.
2022-09-07 21:30:44 +01:00
Bram Moolenaar
9667b2c888
patch 9.0.0406: deferred functions not invoked when partial func exits
...
Problem: Deferred functions not invoked when partial func exits.
Solution: Create a funccall_T when calling a :def function.
2022-09-07 17:28:09 +01:00
Bram Moolenaar
c9c967da09
patch 9.0.0405: arguments in a partial not used by a :def function
...
Problem: Arguments in a partial not used by a :def function.
Solution: Put the partial arguments on the stack.
2022-09-07 16:48:46 +01:00
Bram Moolenaar
98aff658d5
patch 9.0.0399: using :defer in expression funcref not tested
...
Problem: Using :defer in expression funcref not tested.
Solution: Add a test. Fix uncovered problems.
2022-09-06 21:02:35 +01:00
Bram Moolenaar
ca16c60f33
patch 9.0.0398: members of funccall_T are inconsistently named
...
Problem: Members of funccall_T are inconsistently named.
Solution: Use the "fc_" prefix for all members.
2022-09-06 18:57:08 +01:00
Bram Moolenaar
58779858fb
patch 9.0.0397: :defer not tested with exceptions and ":qa!"
...
Problem: :defer not tested with exceptions and ":qa!".
Solution: Test :defer works when exceptions are thrown and when ":qa!" is
used. Invoke the deferred calls on exit.
2022-09-06 18:31:14 +01:00
Bram Moolenaar
86d87256c4
patch 9.0.0390: cannot use a partial with :defer
...
Problem: Cannot use a partial with :defer.
Solution: Add the partial arguments before the other arguments. Disallow
using a dictionary.
2022-09-05 21:21:25 +01:00
Bram Moolenaar
806a273f3c
patch 9.0.0379: cleaning up after writefile() is a hassle
...
Problem: Cleaning up after writefile() is a hassle.
Solution: Add the 'D' flag to defer deleting the written file. Very useful
in tests.
2022-09-04 15:40:36 +01:00
Bram Moolenaar
eb5adf19d1
patch 9.0.0377: argument assignment does not work
...
Problem: Argument assignment does not work.
Solution: Skip over "=".
2022-09-04 13:41:37 +01:00
Yegappan Lakshmanan
6b085b9d73
patch 9.0.0376: clang warns for dead assignments
...
Problem: Clang warns for dead assignments.
Solution: Adjust the code. (Yegappan Lakshmanan, closes #11048 )
2022-09-04 12:47:21 +01:00
Bram Moolenaar
1d84f7608f
patch 9.0.0370: cleaning up afterwards can make a function messy
...
Problem: Cleaning up afterwards can make a function messy.
Solution: Add the :defer command.
2022-09-03 21:35:53 +01:00
Yegappan Lakshmanan
2f892d8663
patch 9.0.0303: it is not easy to get information about a script
...
Problem: It is not easy to get information about a script.
Solution: Make getscriptinf() return the version. When selecting a specific
script return functions and variables. (Yegappan Lakshmanan,
closes #10991 )
2022-08-28 18:52:10 +01:00
Bram Moolenaar
91c7cbfe31
patch 9.0.0225: using freed memory with multiple line breaks in expression
...
Problem: Using freed memory with multiple line breaks in expression.
Solution: Free eval_tofree later.
2022-08-18 13:28:31 +01:00
Kota Kato
948a3894d9
patch 9.0.0219: cannot make a funcref with "s:func" in a def function
...
Problem: Cannot make a funcref with "s:func" in a def function in legacy
script.
Solution: Allow for using a lower case function name after "s:". (Kota Kato,
closes #10926 )
2022-08-16 16:09:59 +01:00
Bram Moolenaar
72981ac94f
patch 9.0.0107: condition always has the same value
...
Problem: Condition always has the same value.
Solution: Remove the condition.
2022-07-29 19:50:41 +01:00
Yegappan Lakshmanan
ee47eaceaa
patch 9.0.0003: functions are global while they could be local
...
Problem: Functions are global while they could be local.
Solution: Add "static". Add a few tests. (Yegappan Lakshmanan,
closes #10612 )
2022-06-29 12:55:36 +01:00
Bram Moolenaar
7d149f899d
patch 8.2.5117: crash when calling a Lua callback from a :def function
...
Problem: Crash when calling a Lua callback from a :def function. (Bohdan
Makohin)
Solution: Handle FC_CFUNC in call_user_func_check(). (closes #10587 )
2022-06-17 19:23:34 +01:00
Bram Moolenaar
5a01caa904
patch 8.2.4992: compiler warning for possibly uninitialized variable
...
Problem: Compiler warning for possibly uninitialized variable. (Tony
Mechelynck)
Solution: Initialize variable in the caller instead of in the function.
2022-05-21 18:56:58 +01:00
Bram Moolenaar
1a56ea8381
patch 8.2.4990: memory leak when :defcompile fails
...
Problem: Memory leak when :defcompile fails.
Solution: Free fname when returning early.
2022-05-21 16:28:42 +01:00
Bram Moolenaar
f79d9dd43f
patch 8.2.4989: cannot specify a function name for :defcompile
...
Problem: Cannot specify a function name for :defcompile.
Solution: Implement a function name argument for :defcompile.
2022-05-21 15:39:02 +01:00
Bram Moolenaar
d881d15984
patch 8.2.4948: cannot use Perl heredoc in nested :def function
...
Problem: Cannot use Perl heredoc in nested :def function. (Virginia
Senioria)
Solution: Only concatenate heredoc lines when not in a nested function.
(closes #10415 )
2022-05-13 13:50:36 +01:00
Bram Moolenaar
6ed545e797
patch 8.2.4928: various white space and cosmetic mistakes
...
Problem: Various white space and cosmetic mistakes.
Solution: Change spaces to tabs, improve comments.
2022-05-09 20:09:23 +01:00
Bram Moolenaar
521bf32bb4
patch 8.2.4888: line number of lambda ignores line continuation
...
Problem: Line number of lambda ignores line continuation.
Solution: Use the line number of where the arguments are. Avoid outputting
"..." twice. (closes #10364 )
2022-05-06 15:47:07 +01:00
Bram Moolenaar
a929c922b1
patch 8.2.4782: accessing freed memory
...
Problem: Accessing freed memory.
Solution: Clear evalarg after checking for trailing characters.
(issue #10218 )
2022-04-18 15:21:17 +01:00
Yegappan Lakshmanan
efbfa867a1
patch 8.2.4770: cannot easily mix expression and heredoc
...
Problem: Cannot easily mix expression and heredoc.
Solution: Support in heredoc. (Yegappan Lakshmanan, closes #10138 )
2022-04-17 12:47:40 +01:00
Yegappan Lakshmanan
7c7e19cf50
patch 8.2.4716: memory allocation failure not tested when defining a function
...
Problem: Memory allocation failure not tested when defining a function.
Solution: Add a test. (Yegappan Lakshmanan, closes #10127 )
2022-04-09 11:09:07 +01:00
Bram Moolenaar
7a411a306f
patch 8.2.4682: Vim9: can use :unlockvar for const variable
...
Problem: Vim9: can use :unlockvar for const variable. (Ernie Rael)
Solution: Check whether the variable is a const.
2022-04-04 14:58:06 +01:00
Bram Moolenaar
96e08e028c
patch 8.2.4659: invalid memory access when using printable function name
...
Problem: Invalid memory access when using printable function name.
Solution: Adjust copied name length.
2022-03-31 21:40:33 +01:00
Bram Moolenaar
a6c18d38ca
patch 8.2.4657: errors for functions are sometimes hard to read
...
Problem: Errors for functions are sometimes hard to read.
Solution: Use printable_func_name() in more places.
2022-03-31 20:02:56 +01:00
Bram Moolenaar
c0ceeeb839
patch 8.2.4650: "import autoload" only works with using 'runtimepath'
...
Problem: "import autoload" only works with using 'runtimepath'.
Solution: Also support a relative and absolute file name.
2022-03-30 21:12:27 +01:00
Bram Moolenaar
1d9cef769d
patch 8.2.4586: Vim9: no error for using lower case name for "func" argument
...
Problem: Vim9: no error for using lower case name for "func" argument.
(Ernie Rael)
Solution: Check the name as soon as the type is known.
2022-03-17 16:30:03 +00:00
Bram Moolenaar
fb43cfc2c6
patch 8.2.4548: script-local function is deleted when used in a funcref
...
Problem: Script-local function is deleted when used in a funcref.
Solution: Do not consider a function starting with "<SNR>" reference
counted. (closes #9916 , closes #9820 )
2022-03-11 18:54:17 +00:00
Bram Moolenaar
ed0c62e7b1
patch 8.2.4529: Vim9: comparing partial with function fails
...
Problem: Vim9: comparing partial with function fails.
Solution: Support this comparison. Avoid a crash. (closes #9909 )
Add more test cases.
2022-03-08 19:43:55 +00:00
Bram Moolenaar
673bcb10eb
patch 8.2.4528: crash when using null_function for a partial
...
Problem: Crash when using null_function for a partial.
Solution: Don't call fname_trans_sid() with NULL. (closes #9908 )
2022-03-08 16:52:24 +00:00
Bram Moolenaar
b2175220da
patch 8.2.4514: Vim9: some flow commands can be shortened
...
Problem: Vim9: some flow commands can be shortened.
Solution: Also require using the full name for ":return", ":enddef",
":continue", ":export" and ":import".
2022-03-05 20:24:41 +00:00
Bram Moolenaar
9383a3afb6
patch 8.2.4472: Coverity warns for use of a freed function name
...
Problem: Coverity warns for use of a freed function name.
Solution: Only check an autoload name when is prefixed.
2022-02-25 21:35:17 +00:00
Bram Moolenaar
dea5ab0fc5
patch 8.2.4460: Vim9: wrong error for defining dict function
...
Problem: Vim9: wrong error for defining dict function.
Solution: Explicitly check for trying to define a dict function.
(closes 9827)
2022-02-23 22:12:02 +00:00
Bram Moolenaar
c2f17f7e64
patch 8.2.4429: using script-local function from the wrong script
...
Problem: Using script-local function from the wrong script when using a
partial. (Yegappan Lakshmanan)
Solution: Include the script ID in the partial name.
2022-02-21 13:13:50 +00:00