Bram Moolenaar
8d739de43b
patch 8.2.1845: Vim9: function defined in a block can't use block variables
...
Problem: Vim9: function defined in a block can't use variables defined in
that block.
Solution: First step: Make a second hashtab that holds all script variables,
also block-local ones, with more information.
2020-10-14 19:39:19 +02:00
Bram Moolenaar
fcdc5d83fb
patch 8.2.1824: Vim9: variables at the script level escape their scope
...
Problem: Vim9: variables at the script level escape their scope.
Solution: When leaving a scope remove variables declared in it.
2020-10-10 19:07:09 +02:00
Bram Moolenaar
922acbda3d
patch 8.2.1814: missing change to remove "static"
...
Problem: Missing change to remove "static".
Solution: Add the change.
2020-10-08 21:30:40 +02:00
Bram Moolenaar
016faaa1b2
patch 8.2.1788: Vim9: still allows :let for declarations
...
Problem: Vim9: still allows :let for declarations.
Solution: Make the default for v:disallow_let one. It can still be set to
zero to allow for using :let.
2020-10-03 12:57:27 +02:00
Bram Moolenaar
cfcd011fcd
patch 8.2.1756: Vim9: :let will soon be disallowed
...
Problem: Vim9: :let will soon be disallowed.
Solution: Add v:disallow_let temporarily. Fix tests.
2020-09-27 15:19:27 +02:00
Bram Moolenaar
c0e29010f6
patch 8.2.1755: Vim9: crash when using invalid heredoc marker
...
Problem: Vim9: crash when using invalid heredoc marker. (Dhiraj Mishra)
Solution: Check for NULL list. (closes #7027 ) Fix comment character.
2020-09-27 14:22:48 +02:00
Bram Moolenaar
f6a44f714a
patch 8.2.1753: Vim9: crash when using import at script level
...
Problem: Vim9: crash when using import at script level.
Solution: Give a "not implemented yet" error. (closes #7026 )
2020-09-27 13:51:14 +02:00
Bram Moolenaar
30fd8204ce
patch 8.2.1744: Vim9: using ":const!" is weird
...
Problem: Vim9: using ":const!" is weird.
Solution: Use "var" - "final" - "const" like Dart. "let" still works for
now.
2020-09-26 15:09:30 +02:00
Bram Moolenaar
a187c43cfe
patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9
...
Problem: Cannot lock a variable in legacy Vim script like in Vim9.
Solution: Make ":lockvar 0" work.
2020-09-16 21:08:28 +02:00
Bram Moolenaar
0b4c66c67a
patch 8.2.1685: Vim9: cannot declare a constant value
...
Problem: Vim9: cannot declare a constant value.
Solution: Introduce ":const!".
2020-09-14 21:39:44 +02:00
Bram Moolenaar
dbeecb2b6b
patch 8.2.1682: Vim9: const works in an unexpected way
...
Problem: Vim9: const works in an unexpected way.
Solution: ":const" only disallows changing the variable, not the value.
Make "list[0] = 9" work at the script level.
2020-09-14 18:15:09 +02:00
Bram Moolenaar
b0fa5e17c5
patch 8.2.1669: Vim9: memory leak when storing a value fails
...
Problem: Vim9: memory leak when storing a value fails.
Solution: Free the value when not storing it.
2020-09-12 19:51:42 +02:00
Bram Moolenaar
c1ec0422e4
patch 8.2.1650: Vim9: result of && and || expression is not bool in script
...
Problem: Vim9: result of && and || expression cannot be assigned to a bool
at the script level.
Solution: Add the VAR_BOOL_OK flag. Convert to bool when needed.
2020-09-09 22:27:58 +02:00
Bram Moolenaar
6f84b6db10
patch 8.2.1563: Vim9: error when using '%" with setbufvar() r getbufvar()
...
Problem: Vim9: error when using '%" with setbufvar() or getbufvar().
Solution: Use tv_get_buf_from_arg(). (closes #6816 )
2020-09-01 23:16:32 +02:00
Bram Moolenaar
e3d4685f1f
patch 8.2.1539: using invalid script ID causes a crash
...
Problem: Using invalid script ID causes a crash.
Solution: Check the script ID to be valid. (closes #6804 )
2020-08-29 13:39:17 +02:00
Bram Moolenaar
601e76ac3c
patch 8.2.1527: Vim9: cannot use a function name at script level
...
Problem: Vim9: cannot use a function name as a function reference at script
level.
Solution: Check if a name is a function name. (closes #6789 )
2020-08-27 21:33:10 +02:00
Bram Moolenaar
7cb6fc29d0
patch 8.2.1504: Vim9: white space checks are only done for a :def function
...
Problem: Vim9: white space checks are only done for a :def function.
Solution: Also do checks at the script level. Adjust the name of a few
error messages.
2020-08-21 22:36:47 +02:00
Bram Moolenaar
122616d9c1
patch 8.2.1502: Vim9: can use += with a :let command at script level
...
Problem: Vim9: can use += with a :let command at script level.
Solution: Give an error.
2020-08-21 21:32:50 +02:00
Bram Moolenaar
191929b182
patch 8.2.1489: Vim9: error when setting an option with setbufvar()
...
Problem: Vim9: error when setting an option with setbufvar().
Solution: Do not get a number from a string value. (closes #6740 )
2020-08-19 21:20:49 +02:00
Bram Moolenaar
021bda5671
patch 8.2.1473: items in a list given to :const can still be modified
...
Problem: Items in a list given to :const can still be modified.
Solution: Work like ":lockvar! name" but don't lock referenced items.
Make locking a blob work.
2020-08-17 21:07:22 +02:00
Bram Moolenaar
241572794f
patch 8.2.1471: :const only locks the variable, not the value
...
Problem: :const only locks the variable, not the value.
Solution: Lock the value as ":lockvar 1 var" would do. (closes #6719 )
2020-08-16 22:50:01 +02:00
Bram Moolenaar
0aae4809fd
patch 8.2.1469: Vim9: cannot assign string to string option
...
Problem: Vim9: cannot assign string to string option.
Solution: Change checks for option value. (closes #6720 )
2020-08-16 21:29:05 +02:00
Bram Moolenaar
451c2e3536
patch 8.2.1460: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more messages into errors.h.
2020-08-15 16:33:28 +02:00
Bram Moolenaar
53b29e4845
patch 8.2.1459: Vim9: declaring script var in script does not infer the type
...
Problem: Vim9: declaring ascript variable at the script level does not
infer the type.
Solution: Get the type from the value. (closes #6716 )
2020-08-15 14:31:20 +02:00
Bram Moolenaar
bc4c505166
patch 8.2.1444: error messages are spread out and names can be confusing
...
Problem: Error messages are spread out and names can be confusing.
Solution: Start moving error messages to a separate file and use clear
names.
2020-08-13 22:47:35 +02:00
Bram Moolenaar
98b4f145eb
patch 8.2.1395: Vim9: no error if declaring a funcref with lower case letter
...
Problem: Vim9: no error if declaring a funcref with a lower case letter.
Solution: Check the name after the type is inferred. Fix confusing name.
2020-08-08 15:46:01 +02:00
Bram Moolenaar
bb1b5e24ec
patch 8.2.1365: Vim9: no error for missing white space around operator
...
Problem: Vim9: no error for missing white space around operator.
Solution: Check for white space. (closes #6618 )
2020-08-05 10:53:21 +02:00
Bram Moolenaar
c2ee44cc38
patch 8.2.1355: Vim9: no error using :let for options and registers
...
Problem: Vim9: no error using :let for options and registers.
Solution: Give an error. (closes #6568 )
2020-08-02 16:59:00 +02:00
Bram Moolenaar
c7e44a7e4c
patch 8.2.1324: Vim9: line break after "=" does not work
...
Problem: Vim9: line break after "=" does not work.
Solution: Also allow for NUL after "=". (closes #6549 )
2020-07-29 21:37:43 +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
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
63be3d4ba0
patch 8.2.1274: Vim9: no error for missing white space at script level
...
Problem: Vim9: no error for missing white space in assignment at script
level.
Solution: Check for white space. (closes #6495 )
2020-07-23 13:11:37 +02:00
Bram Moolenaar
d43906d2e5
patch 8.2.1255: cannot use a lambda with quickfix functions
...
Problem: Cannot use a lambda with quickfix functions.
Solution: Add support for lambda. (Yegappan Lakshmanan, closes #6499 )
2020-07-20 21:31:32 +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
2b6ef856fb
patch 8.2.1184: some tests fail
...
Problem: Some tests fail.
Solution: Adjust tests for different assert_fails() behavior. Remove unused
variable.
2020-07-11 22:25:57 +02:00
Bram Moolenaar
9b7bf9e98f
patch 8.2.1183: assert_fails() checks the last error message
...
Problem: assert_fails() checks the last error message.
Solution: Check the first error, it is more relevant. Fix all the tests
that rely on the old behavior.
2020-07-11 22:14:59 +02:00
Bram Moolenaar
c620c055ce
patch 8.2.1154: Vim9: crash when using imported function
...
Problem: Vim9: crash when using imported function.
Solution: Check for a function type. Set the script context when calling a
function. (closes #6412 )
2020-07-08 15:16:19 +02:00
Bram Moolenaar
eeb27bfe28
patch 8.2.1126: Vim9: using :copen causes an error
...
Problem: Vim9: using :copen causes an error.
Solution: Add flag LET_NO_COMMAND in set_var().
2020-07-04 17:39:10 +02:00
Bram Moolenaar
9a78e6df17
patch 8.2.1111: inconsistent naming of get_list_tv() and eval_dict()
...
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.
2020-07-01 18:29:55 +02:00
Bram Moolenaar
d5053d015a
patch 8.2.1079: Vim9: no line break allowed in a while loop
...
Problem: Vim9: no line break allowed in a while loop.
Solution: Update stored loop lines when finding line breaks.
2020-06-28 15:51:16 +02:00
Bram Moolenaar
faf8626b79
patch 8.2.1076: Vim9: no line break allowed in :if expression
...
Problem: Vim9: no line break allowed in :if expression.
Solution: Skip linebreak.
2020-06-27 23:07:36 +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
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
e55b1c098d
patch 8.2.1028: Vim9: no error for declaring buffer, window, etc. variable
...
Problem: Vim9: no error for declaring buffer, window, etc. variable.
Solution: Give an error. Unify the error messages.
2020-06-21 15:52:59 +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
c785b9a7f4
patch 8.2.1011: Vim9: some code not tested
...
Problem: Vim9: some code not tested.
Solution: Add a few more test cases. Reorder checks for clearer error.
Remove unreachable code.
2020-06-19 18:34:15 +02:00
Bram Moolenaar
84cf6bd81b
patch 8.2.0988: getting directory contents is always case sorted
...
Problem: Getting directory contents is always case sorted.
Solution: Add sort options and v:collate. (Christian Brabandt, closes #6229 )
2020-06-16 20:03:43 +02:00