Bram Moolenaar
9681f71392
patch 8.2.2027: Coverity warnts for uninitialized field
...
Problem: Coverity warnts for uninitialized field.
Solution: Set "v_lock".
2020-11-21 13:58:50 +01:00
Bram Moolenaar
659bb2275e
patch 8.2.1980: Vim9: some tests are not done at the script level
...
Problem: Vim9: some tests are not done at the script level.
Solution: Use CheckDefAndScriptSuccess() in more places. Fix uncovered
problems.
2020-11-12 20:16:39 +01:00
Bram Moolenaar
c56936e2ba
patch 8.2.1971: memory leak when map() fails
...
Problem: Memory leak when map() fails.
Solution: Clear the typval.
2020-11-10 11:43:56 +01:00
Bram Moolenaar
ea696852e7
patch 8.2.1969: Vim9: map() may change the list or dict item type
...
Problem: Vim9: map() may change the list or dict item type.
Solution: Add mapnew().
2020-11-09 18:31:39 +01:00
Bram Moolenaar
348be7ed07
patch 8.2.1949: Vim9: using extend() on null dict is silently ignored
...
Problem: Vim9: using extend() on null dict is silently ignored.
Solution: Give an error message. Initialize a dict variable with an empty
dictionary. (closes #7251 )
2020-11-04 11:36:35 +01:00
Bram Moolenaar
0d90e728fe
patch 8.2.1945: crash when passing NULL function to reduce()
...
Problem: Crash when passing NULL function to reduce().
Solution: Check for NULL pointer and give an error. (Dominique Pellé,
closes #7243 )
2020-11-03 18:20:19 +01:00
Bram Moolenaar
55e29611d2
patch 8.2.1933: cannot sort using locale ordering
...
Problem: Cannot sort using locale ordering.
Solution: Add a flag for :sort and sort() to use the locale. (Dominique
Pellé, closes #7237 )
2020-11-01 13:57:44 +01:00
Bram Moolenaar
ffdf8adfa8
patch 8.2.1852: map() returing zero for NULL list is unexpected
...
Problem: map() returing zero for NULL list is unexpected.
Solution: Return the empty list. (closes #7133 )
2020-10-15 22:29:17 +02:00
Bram Moolenaar
1a73923705
patch 8.2.1821: Vim9: concatenating to a NULL list doesn't work
...
Problem: Vim9: concatenating to a NULL list doesn't work.
Solution: Handle a NULL list like an empty list. (closes #7064 )
2020-10-10 15:37:58 +02:00
Bram Moolenaar
08e51f446b
patch 8.2.1701: Vim9: sort("i") does not work
...
Problem: Vim9: sort("i") does not work.
Solution: Don't try getting a number for a string argument. (closes #6958 )
2020-09-16 23:23:36 +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
a48f786787
patch 8.2.1610: Vim9: cannot pass "true" to list2str() and str2list()
...
Problem: Vim9: cannot pass "true" to list2str() and str2list().
Solution: Use tv_get_bool_chk(). (closes #6877 )
2020-09-05 20:16:57 +02:00
Bram Moolenaar
119f557230
patch 8.2.1571: Vim9: count() third argument cannot be "true"
...
Problem: Vim9: count() third argument cannot be "true".
Solution: use tv_get_bool_chk(). (closes #6818 )
2020-09-02 21:31:22 +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
cc673e746a
patch 8.2.1466: Vim9: cannot index or slice a variable with type "any"
...
Problem: Vim9: cannot index or slice a variable with type "any".
Solution: Add runtime index and slice.
2020-08-16 17:33:35 +02:00
Bram Moolenaar
56acb0943e
patch 8.2.1465: Vim9: subscript not handled properly
...
Problem: Vim9: subscript not handled properly.
Solution: Adjust error message. Remove dead code. Disallow string to
number conversion in scripts.
2020-08-16 14:48:19 +02:00
Bram Moolenaar
ed5918771f
patch 8.2.1463: Vim9: list slice not supported yet
...
Problem: Vim9: list slice not supported yet.
Solution: Add support for list slicing.
2020-08-15 22:14:53 +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
db199216e8
patch 8.2.1430: Vim9: error for missing comma instead of extra white space
...
Problem: Vim9: error for missing comma instead of extra white space.
Solution: Check if comma can be found after white space. (closes #6668 )
Also check for extra white space in literal dict. (closes #6670 )
2020-08-12 18:01:53 +02:00
Bram Moolenaar
4d4d1cd5c8
patch 8.2.1328: no space allowed before comma in list
...
Problem: No space allowed before comma in list.
Solution: Legacy Vim script allows it. (closes #6577 )
2020-07-30 22:14:33 +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
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
962d721319
patch 8.2.1125: Vim9: double quote can be a string or a comment
...
Problem: Vim9: double quote can be a string or a comment.
Solution: Only support comments starting with # to avoid confusion.
2020-07-04 14:15:00 +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
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
fda20c4cc5
patch 8.2.1083: crash when using reduce() on a NULL list
...
Problem: Crash when using reduce() on a NULL list.
Solution: Only access the list when not NULL.
2020-06-29 20:09:36 +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
e6e031739c
patch 8.2.1069: Vim9: fail to check for white space in list
...
Problem: Vim9: fail to check for white space in list.
Solution: Add check for white space.
2020-06-27 16:36:05 +02:00
Bram Moolenaar
7147820cb9
patch 8.2.1065: Vim9: no line break allowed inside a list
...
Problem: Vim9: no line break allowed inside a list.
Solution: Handle line break inside a list in Vim9 script.
2020-06-26 22:46:27 +02:00
Bram Moolenaar
ca275a05d8
patch 8.2.1051: crash when changing a list while using reduce() on it
...
Problem: Crash when changing a list while using reduce() on it.
Solution: Lock the list. (closes #6330 )
2020-06-24 22:07:46 +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
9af78769ee
patch 8.2.0987: Vim9: cannot assign to [var; var]
...
Problem: Vim9: cannot assign to [var; var].
Solution: Assign rest of items to a list.
2020-06-16 11:34:42 +02:00
Bram Moolenaar
dcf59c37d0
patch 8.2.0937: asan failure in the flatten() test
...
Problem: Asan failure in the flatten() test.
Solution: Free the flattened list.
2020-06-09 17:30:04 +02:00
Bram Moolenaar
077a1e670a
patch 8.2.0935: flattening a list with existing code is slow
...
Problem: Flattening a list with existing code is slow.
Solution: Add flatten(). (Mopp, closes #3676 )
2020-06-08 20:50:43 +02:00
Bram Moolenaar
48b1c21809
patch 8.2.0882: leaking memory when using reduce()
...
Problem: Leaking memory when using reduce().
Solution: Free the intermediate value.
2020-06-01 20:11:02 +02:00
Bram Moolenaar
85629985b7
patch 8.2.0878: no reduce() function
...
Problem: No reduce() function.
Solution: Add a reduce() function. (closes #5481 )
2020-06-01 18:39:20 +02:00
Bram Moolenaar
fcb0b61d15
patch 8.2.0829: filter() may give misleading error message
...
Problem: filter() may give misleading error message.
Solution: Also mention Blob as an allowed argument.
2020-05-26 20:22:01 +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
92b83ccfda
patch 8.2.0634: crash with null partial and blob
...
Problem: Crash with null partial and blob.
Solution: Check for NULL pointer. Add more tests. (Yegappan Lakshmanan,
closes #5984 )
2020-04-25 15:24:44 +02:00
Bram Moolenaar
a80faa8930
patch 8.2.0559: clearing a struct is verbose
...
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
2020-04-12 19:37:17 +02:00
Bram Moolenaar
7b293c730b
patch 8.2.0539: comparing two NULL list fails
...
Problem: Comparing two NULL list fails.
Solution: Change the order of comparing two lists.
2020-04-09 21:33:22 +02:00
Bram Moolenaar
00d253e2b2
patch 8.2.0523: loops are repeated
...
Problem: Loops are repeated.
Solution: Use FOR_ALL_ macros. (Yegappan Lakshmanan, closes #5882 )
2020-04-06 22:13:01 +02:00
Bram Moolenaar
bdff012f44
patch 8.2.0514: several global functions are used in only one file
...
Problem: Several global functions are used in only one file.
Solution: Make the functions static. (Yegappan Lakshmanan, closes #5884 )
2020-04-05 18:56:05 +02:00
Bram Moolenaar
aeea72151c
patch 8.2.0500: using the same loop in many places
...
Problem: Using the same loop in many places.
Solution: Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339 )
2020-04-02 18:50:46 +02:00
Bram Moolenaar
ee619e5bc0
patch 8.2.0469: Vim9: no error for missing ] after list
...
Problem: Vim9: no error for missing ] after list.
Solution: Add error message. Add more tests.
2020-03-28 21:38:06 +01:00
Bram Moolenaar
db661fb95d
patch 8.2.0175: crash when removing list element in map()
...
Problem: Crash when removing list element in map().
Solution: Lock the list. (closes #2652 )
2020-01-29 22:17:16 +01:00
Bram Moolenaar
0ff6aad393
patch 8.2.0173: build fails with old compiler
...
Problem: Build fails with old compiler.
Solution: Do not use anonymous unions. (John Marriott)
2020-01-29 21:27:21 +01:00
Bram Moolenaar
89bfc8218c
patch 8.2.0160: range test fails
...
Problem: Range test fails.
Solution: Include change in list code. (#5541 )
2020-01-27 22:37:23 +01:00
Bram Moolenaar
8a7d6542b3
patch 8.2.0149: maintaining a Vim9 branch separately is more work
...
Problem: Maintaining a Vim9 branch separately is more work.
Solution: Merge the Vim9 script changes.
2020-01-26 15:56:19 +01:00