Bram Moolenaar
af8edbb8dc
patch 8.2.1333: Vim9: memory leak when using nested global function
...
Problem: Vim9: memory leak when using nested global function.
Solution: Swap from and to when copying the lines.
2020-08-01 00:03:09 +02:00
Bram Moolenaar
ce6583568f
patch 8.2.1332: Vim9: memory leak when using nested global function
...
Problem: Vim9: memory leak when using nested global function.
Solution: Delete the function when deleting the instruction. Disable test
that still causes a leak.
2020-07-31 23:47:12 +02:00
Bram Moolenaar
38ddf333f6
patch 8.2.1329: Vim9: cannot define global function inside :def function
...
Problem: Vim9: cannot define global function inside :def function.
Solution: Assign to global variable instead of local. (closes #6584 )
2020-07-31 22:05:04 +02:00
Bram Moolenaar
9d48956681
patch 8.2.1326: Vim9: skipping over white space after list
...
Problem: Vim9: skipping over white space after list.
Solution: Do not skip white space, a following [] would be misinterpreted.
(closes #6552 ) Fix a few side effects.
2020-07-30 20:08:50 +02:00
Bram Moolenaar
9898107f54
patch 8.2.1314: Vim9: rule for comment after :function is confusing
...
Problem: Vim9: rule for comment after :function is confusing.
Solution: Allow double quoted comment after :function in vim9script.
(closes #6556 )
2020-07-29 14:40:25 +02:00
Bram Moolenaar
4fc224ca1c
patch 8.2.1300: Vim9: optional argument type not parsed properly
...
Problem: Vim9: optional argument type not parsed properly.
Solution: Skip over the "?". (issue #6507 )
2020-07-26 17:56:25 +02:00
Bram Moolenaar
925e9fd633
patch 8.2.1290: Vim9: cannot replace a global function
...
Problem: Vim9: cannot replace a global function.
Solution: Allow for "!" on a global function. (closes #6524 ) Also fix that
:delfunc on a :def function only made it empty.
2020-07-25 15:41:11 +02:00
Bram Moolenaar
2d06bfde29
patch 8.2.1281: the "trailing characters" error can be hard to understand
...
Problem: The "trailing characters" error can be hard to understand.
Solution: Add the trailing characters to the message.
2020-07-23 17:16:18 +02:00
Bram Moolenaar
e7e4838f25
patch 8.2.1268: Vim9: no error for using double quote comment
...
Problem: Vim9: no error for using double quote comment after :func or :def.
Solution: Only accept double quote when not in Vim9 script and not after
:def. (closes #6483 )
2020-07-22 18:17:08 +02:00
Bram Moolenaar
682d0a1546
patch 8.2.1251: Vim9: warning for pointer usage, test failure undetected
...
Problem: Vim9: warning for pointer usage, test failure undetected.
Solution: Fix pointer indirection. Give error when executing function
failed for any reason. Fix instruction names.
2020-07-19 20:48:59 +02:00
Bram Moolenaar
1f22cc5cdb
patch 8.2.1210: using ht_used when looping through a hashtab is less reliable
...
Problem: Using ht_used when looping through a hashtab is less reliable.
Solution: Use ht_changed in a few more places.
2020-07-14 21:08:49 +02:00
Bram Moolenaar
7ce85be63b
patch 8.2.1207: Vim9: crash in expr test when run in the GUI
...
Problem: Vim9: crash in expr test when run in the GUI.
Solution: Break out of loop over hashtab also when function got removed and
added.
2020-07-14 15:01:05 +02:00
Bram Moolenaar
eb6880b6eb
patch 8.2.1190: Vim9: checking for Vim9 syntax is spread out
...
Problem: Vim9: checking for Vim9 syntax is spread out.
Solution: Use in_vim9script().
2020-07-12 17:07:05 +02:00
Bram Moolenaar
914e7eaa67
patch 8.2.1182: Vim9: no check for whitespace after comma in lambda
...
Problem: Vim9: no check for whitespace after comma in lambda.
Solution: Give error if white space is missing.
2020-07-11 15:20:48 +02:00
Bram Moolenaar
efaaaa683b
patch 8.2.1162: crash when using a lambda
...
Problem: Crash when using a lambda.
Solution: Check for evalarg to be NULL.
2020-07-08 22:24:09 +02:00
Bram Moolenaar
8e2730a315
patch 8.2.1161: Vim9: using freed memory
...
Problem: Vim9: using freed memory.
Solution: Put pointer back in evalarg instead of freeing it.
2020-07-08 22:01:49 +02:00
Bram Moolenaar
6110e79a58
patch 8.2.1160: Vim9: memory leak in allocated types
...
Problem: Vim9: memory leak in allocated types.
Solution: Free the type pointers.
2020-07-08 19:35:21 +02:00
Bram Moolenaar
e6b5324e3a
patch 8.2.1110: Vim9: line continuation does not work in function arguments
...
Problem: Vim9: line continuation does not work in function arguments.
Solution: Pass "evalarg" to get_func_tv(). Fix seeing double quoted string
as comment.
2020-07-01 17:28:33 +02:00
Bram Moolenaar
7d2ac92ebc
patch 8.2.1084: Lua: registering function has useless code
...
Problem: Lua: registering function has useless code.
Solution: Remove clearing grow arrays.
2020-06-29 20:20:33 +02:00
Bram Moolenaar
b7a78f7a67
patch 8.2.1080: Vim9: no line break allowed in a for loop
...
Problem: Vim9: no line break allowed in a for loop.
Solution: Skip line breaks in for command.
2020-06-28 18:43:40 +02:00
Bram Moolenaar
9215f01218
patch 8.2.1074: Vim9: no line break allowed after some operators
...
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.
2020-06-27 21:18:00 +02:00
Bram Moolenaar
e40fbc2ca9
patch 8.2.1071: Vim9: no line break allowed inside a lambda
...
Problem: Vim9: no line break allowed inside a lambda.
Solution: Handle line break inside a lambda in Vim9 script.
2020-06-27 18:06:45 +02:00
Bram Moolenaar
0b1cd52ff6
patch 8.2.1067: expression "!expr->func()" does not work
...
Problem: Expression "!expr->func()" does not work.
Solution: Apply plus and minus earlier. (closes #6348 )
2020-06-27 13:11:50 +02:00
Bram Moolenaar
801ab06934
patch 8.2.1054: not so easy to pass a lua function to Vim
...
Problem: Not so easy to pass a lua function to Vim.
Solution: Convert a Lua function and closure to a Vim funcref. (Prabir
Shrestha, closes #6246 )
2020-06-25 19:27:56 +02:00
Bram Moolenaar
b171fb1790
patch 8.2.1049: Vim9: leaking memory when using continuation line
...
Problem: Vim9: leaking memory when using continuation line.
Solution: Keep a pointer to the continuation line in evalarg_T. Centralize
checking for a next command.
2020-06-24 20:34:03 +02:00
Bram Moolenaar
5409f5d8c9
patch 8.2.1047: Vim9: script cannot use line continuation like :def function
...
Problem: Vim9: script cannot use line continuation like in a :def function.
Solution: Pass the getline function pointer to the eval() functions. Use it
for addition and multiplication operators.
2020-06-24 18:37:35 +02:00
Bram Moolenaar
6797966dfc
patch 8.2.1024: Vim9: no error for using "let g:var = val"
...
Problem: Vim9: no error for using "let g:var = val".
Solution: Add an error.
2020-06-20 22:50:47 +02:00
Bram Moolenaar
0cb5bcf583
patch 8.2.1023: Vim9: redefining a function uses a new index every time
...
Problem: Vim9: redefining a function uses a new index every time.
Solution: When redefining a function clear the contents and re-use the
index.
2020-06-20 18:19:09 +02:00
Bram Moolenaar
71ccd03ee8
patch 8.2.0967: unnecessary type casts for vim_strnsave()
...
Problem: Unnecessary type casts for vim_strnsave().
Solution: Remove the type casts.
2020-06-12 22:59:11 +02:00
Bram Moolenaar
9721fb4ea3
patch 8.2.0960: cannot use :import in legacy Vim script
...
Problem: Cannot use :import in legacy Vim script.
Solution: Support :import in any Vim script.
2020-06-11 23:10:46 +02:00
Bram Moolenaar
3fffa97159
patch 8.2.0908: crash when changing the function table while listing it
...
Problem: Crash when changing the function table while listing it.
Solution: Bail out when the function table changes. (closes #6209 )
2020-06-05 21:06:10 +02:00
Bram Moolenaar
285b189260
patch 8.2.0827: Vim9: crash in :defcompile
...
Problem: Vim9: crash in :defcompile.
Solution: Fix off-by-one error.
2020-05-26 11:37:26 +02:00
Bram Moolenaar
ebc3de634f
patch 8.2.0826: Vim9: crash in :defcompile
...
Problem: Vim9: crash in :defcompile.
Solution: Restart the loop after a call to compile_def_function() caused the
hash table to resize.
2020-05-26 11:08:28 +02:00
Bram Moolenaar
a14e697547
patch 8.2.0825: def_function() may return pointer that was freed
...
Problem: def_function() may return pointer that was freed.
Solution: Set "fp" to NULL after freeing it.
2020-05-25 23:29:28 +02:00
Bram Moolenaar
25e0f5863e
patch 8.2.0823: Vim9: script reload test is disabled
...
Problem: Vim9: script reload test is disabled.
Solution: Compile a function in the context of the script where it was
defined. Set execution stack for compiled function. Add a test
that an error is reported for the right file/function.
2020-05-25 22:36:50 +02:00
Bram Moolenaar
6ff71d8b7f
patch 8.2.0820: Vim9: function type isn't set until compiled
...
Problem: Vim9: function type isn't set until compiled.
Solution: Set function type early.
2020-05-24 23:45:24 +02:00
Bram Moolenaar
822ba24743
patch 8.2.0818: Vim9: using a discovery phase doesn't work well
...
Problem: Vim9: using a discovery phase doesn't work well.
Solution: Remove the discovery phase, instead compile a function only when
it is used. Add :defcompile to compile def functions earlier.
2020-05-24 23:00:18 +02:00
Bram Moolenaar
6f5b6dfb16
patch 8.2.0771: Vim9: cannot call a compiled closure from not compiled code
...
Problem: Vim9: cannot call a compiled closure from not compiled code.
Solution: Pass funcexe to call_user_func().
2020-05-16 21:20:12 +02:00
Bram Moolenaar
32e351179e
patch 8.2.0753: Vim9: expressions are evaluated in the discovery phase
...
Problem: Vim9: expressions are evaluated in the discovery phase.
Solution: Bail out if an expression is not a constant. Require a type for
declared constants.
2020-05-14 22:41:15 +02:00
Bram Moolenaar
7e9f351b2e
patch 8.2.0751: Vim9: performance can be improved
...
Problem: Vim9: performance can be improved.
Solution: Don't call break. Inline check for list materialize. Make an
inline version of ga_grow().
2020-05-13 22:44:22 +02:00
Bram Moolenaar
09689a0284
patch 8.2.0725: Vim9: cannot call a function declared later in Vim9 script
...
Problem: Vim9: cannot call a function declared later in Vim9 script.
Solution: Make two passes through the script file.
2020-05-09 22:50:08 +02:00
Bram Moolenaar
04b1269783
patch 8.2.0695: Vim9: cannot define a function inside a function
...
Problem: Vim9: cannot define a function inside a function.
Solution: Initial support for :def inside :def.
2020-05-04 23:24:44 +02:00
Bram Moolenaar
f7779c63d4
patch 8.2.0684: Vim9: memory leak when using lambda
...
Problem: Vim9: memory leak when using lambda.
Solution: Move the funccal context to the partial. Free the function when
exiting.
2020-05-03 15:38:16 +02:00
Bram Moolenaar
5adc55cb74
patch 8.2.0683: Vim9: parsing type does not always work
...
Problem: Vim9: parsing type does not always work.
Solution: Handle func type without return value. Test more closures.
Fix type check offset. Fix garbage collection.
2020-05-02 23:12:58 +02:00
Bram Moolenaar
c8cd2b34d1
patch 8.2.0677: Vim9: no support for closures
...
Problem: Vim9: no support for closures.
Solution: Find variables in the outer function scope, so long as the scope
exists.
2020-05-01 19:29:08 +02:00
Bram Moolenaar
03afdcf1f4
patch 8.2.0653: using uninitialized pointer
...
Problem: using uninitialized pointer.
Solution: Move assignment up. (John Marriott)
2020-04-27 23:39:30 +02:00
Bram Moolenaar
909ed7e902
patch 8.2.0652: compiler warning for char conversion
...
Problem: Compiler warning for char conversion.
Solution: Use unsigned char buffer.
2020-04-27 23:16:41 +02:00
Bram Moolenaar
4c17ad94ec
patch 8.2.0650: Vim9: script function can be deleted
...
Problem: Vim9: script function can be deleted.
Solution: Disallow deleting script function. Delete functions when sourcing
a script again.
2020-04-27 22:47:51 +02:00
Bram Moolenaar
b8ce6b0005
patch 8.2.0627: Vim9: error message does not work
...
Problem: Vim9: error message does not work. (Yegappan Lakshmanan)
Solution: Swap lines.
2020-04-23 22:23:14 +02:00
Bram Moolenaar
f93c7fea08
patch 8.2.0626: Vim9: wrong syntax of function in Vim9 script
...
Problem: Vim9: wrong syntax of function in Vim9 script.
Solution: Give error for missing space. Implement :echomsg and :echoerr.
(closes #5670 )
2020-04-23 22:16:53 +02:00