Bram Moolenaar
0abc2871c1
patch 8.2.4930: interpolated string expression requires escaping
...
Problem: Interpolated string expression requires escaping.
Solution: Do not require escaping in the expression.
2022-05-10 13:24:30 +01:00
LemonBoy
2eaef106e4
patch 8.2.4883: string interpolation only works in heredoc
...
Problem: String interpolation only works in heredoc.
Solution: Support interpolated strings. Use syntax for heredoc consistent
with strings, similar to C#. (closes #10327 )
2022-05-06 13:14:50 +01:00
LemonBoy
47d4e317f8
patch 8.2.4866: duplicate code in "get" functions
...
Problem: Duplicate code in "get" functions.
Solution: Use get_var_from() for getwinvar(), gettabvar(), gettabwinvar()
and getbufvar(). (closes #10335 )
2022-05-04 18:12:55 +01:00
Bram Moolenaar
05c7f5d3d0
patch 8.2.4840: heredoc expression evaluated even when skipping
...
Problem: Heredoc expression evaluated even when skipping.
Solution: Don't evaluate when "skip" is set. (closes #10306 )
2022-04-28 16:51:41 +01:00
Yegappan Lakshmanan
1fc6ea9bf3
patch 8.2.4804: expression in heredoc doesn't work for compiled function
...
Problem: Expression in heredoc doesn't work for compiled function.
Solution: Implement compiling the heredoc expressions. (Yegappan Lakshmanan,
closes #10232 )
2022-04-21 23:30:15 +01:00
Bram Moolenaar
42ccb8d747
patch 8.2.4783: Coverity warns for leaking memory
...
Problem: Coverity warns for leaking memory.
Solution: Use another strategy freeing "theline".
2022-04-18 15:45:23 +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
LemonBoy
7714231bb5
patch 8.2.4754: using cached values after unsetting some environment variables
...
Problem: Still using cached values after unsetting some known environment
variables.
Solution: Take care of the side effects. (closes #10194 )
2022-04-15 20:50:46 +01:00
Bram Moolenaar
31e5c60a68
patch 8.2.4753: error from setting an option is silently ignored
...
Problem: Error from setting an option is silently ignored.
Solution: Handle option value errors better. Fix uses of N_().
2022-04-15 13:53:33 +01:00
Bram Moolenaar
aa7d0c2335
patch 8.2.4698: Vim9: script variable has no flag that it was set
...
Problem: Vim9: script variable has no flag that it was set.
Solution: Add a flag that it was set, to avoid giving it a value when used.
(closes #10088 )
2022-04-05 21:40:38 +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
22ebd172e4
patch 8.2.4662: no error for using out of range list index
...
Problem: No error for using out of range list index.
Solution: Check list index at script level like in compiled function.
(closes #10051 )
2022-04-01 15:26:58 +01:00
Bram Moolenaar
859cc21c6b
patch 8.2.4642: Vim9: in :def function script var cannot be null
...
Problem: Vim9: in :def function script var cannot be null.
Solution: Only initialize a script variable when not set to a null value.
(closes #10034 )
2022-03-28 15:22:35 +01:00
Bram Moolenaar
501f978288
patch 8.2.4635: tests using null list or dict fail
...
Problem: Tests using null list or dict fail.
Solution: Only use the new rules for Vim9 script.
2022-03-27 16:51:04 +01:00
Bram Moolenaar
ec15b1cfdc
patch 8.2.4634: Vim9: cannot initialize a variable to null_list
...
Problem: Vim9: cannot initialize a variable to null_list.
Solution: Give negative count to NEWLIST. (closes #10027 )
Also fix inconsistencies in comparing with null values.
2022-03-27 16:29:53 +01:00
Bram Moolenaar
6b8c7ba062
patch 8.2.4600: Vim9: not enough test coverage for executing :def function
...
Problem: Vim9: not enough test coverage for executing :def function.
Solution: Add a few more tests. Fix inconsistencies.
2022-03-20 17:46:06 +00:00
Bram Moolenaar
8acb9cc620
patch 8.2.4526: Vim9: cannot set variables to a null value
...
Problem: Vim9: cannot set variables to a null value.
Solution: Add null_list, null_job, etc.
2022-03-08 13:18:55 +00:00
Bram Moolenaar
204852ae2a
patch 8.2.4510: Vim9: shortening commands leads to confusing script
...
Problem: Vim9: shortening commands leads to confusing script.
Solution: In Vim9 script require at least ":cont" for ":continue", "const"
instead of "cons", "break" instead of "brea", "catch" instead of
"cat", "else" instead of "el" "elseif" instead of "elsei" "endfor"
instead of "endfo" "endif" instead of "en" "endtry" instead of
"endt", "finally" instead of "fina", "throw" instead of "th",
"while" instead of "wh".
2022-03-05 12:56:44 +00:00
Bram Moolenaar
e1d1211799
patch 8.2.4509: Vim9: can declare a variable with ":va"
...
Problem: Vim9: can declare a variable with ":va".
Solution: Disallow using ":va", require using ":var".
2022-03-05 11:37:48 +00:00
Bram Moolenaar
330a388e18
patch 8.2.4508: Vim9: cannot assign to a global variable on the command line
...
Problem: Vim9: cannot assign to a global variable on the command line.
Solution: Allow using :vim9cmd for assignment on the command line.
2022-03-05 11:05:57 +00:00
Bram Moolenaar
0e1574c406
patch 8.2.4500: Vim9: can declare a global variable on the command line
...
Problem: Vim9: can declare a global variable on the command line.
Solution: Disallow declaring a variable on the command line. (closes #9881 )
2022-03-03 17:05:35 +00:00
Bram Moolenaar
8ccbbeb620
patch 8.2.4492: no error if an option is given a value with ":let &opt = val"
...
Problem: No error if an option is given an invalid value with
":let &opt = val".
Solution: Give the error. (closes #9864 )
2022-03-02 19:49:38 +00:00
Bram Moolenaar
7a22224875
patch 8.2.4487: Vim9: cannot compare with v:null
...
Problem: Vim9: cannot compare with v:null.
Solution: Allow comparing anything with v:null. (closes #9866 )
2022-03-01 19:23:24 +00:00
Bram Moolenaar
993faa3405
patch 8.2.4431: unnecessary condition when assigning to a variable
...
Problem: Unnecessary condition when assigning to a variable.
Solution: Remove the condition.
2022-02-21 15:59:11 +00:00
Bram Moolenaar
0f6e28f686
patch 8.2.4428: crash when switching tabpage while in the cmdline window
...
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window.
2022-02-20 20:49:35 +00:00
Bram Moolenaar
8b716f5f22
patch 8.2.4395: some code lines not covered by tests
...
Problem: Some code lines not covered by tests.
Solution: Add a few more test cases. Fix getting more than one error for
invalid assignment.
2022-02-15 21:17:56 +00:00
Bram Moolenaar
4b1d963972
patch 8.2.4375: ctx_imports is not used
...
Problem: ctx_imports is not used.
Solution: Delete ctx_imports. Add missing dependency.
2022-02-13 21:51:08 +00:00
Bram Moolenaar
75e27d78f5
patch 8.2.4371: Vim9: can create a script variable from a legacy function
...
Problem: Vim9: can create a script variable from a legacy function.
Solution: Disallow creating a script variable from a function.
2022-02-13 13:56:29 +00:00
Bram Moolenaar
54969f4ef5
patch 8.2.4318: various comment and indent mistakes, returning wrong zero
...
Problem: Various comment and indent mistakes, returning wrong zero.
Solution: Fix the mistakes. Return NULL instead of FAIL.
2022-02-07 13:56:44 +00:00
Bram Moolenaar
381692b6f1
patch 8.2.4286: Vim9: strict type checking after copy() and deepcopy()
...
Problem: Vim9: strict type checking after copy() and deepcopy().
Solution: Allow type to change after making a copy. (closes #9644 )
2022-02-02 20:01:27 +00:00
Bram Moolenaar
848faddb87
patch 8.2.4260: Vim9: can still use a global function without g:
...
Problem: Vim9: can still use a global function without g: at the script
level.
Solution: Also check for g: at the script level. (issue #9637 )
2022-01-30 15:28:30 +00:00
Bram Moolenaar
70c43d84be
patch 8.2.4225: Vim9: depth argument of :lockvar not parsed in :def function
...
Problem: Vim9: depth argument of :lockvar not parsed in :def function.
Solution: Parse the optional depth argument. (closes #9629 )
Fix that locking doesn't work for a non-materialize list.
2022-01-26 21:01:15 +00:00
Bram Moolenaar
3e93a2b075
patch 8.2.4209: partial in 'opfunc' cannot use an imported function
...
Problem: partial in 'opfunc' cannot use an imported function.
Solution: Also expand the function name in a partial. (closes #9614 )
2022-01-24 21:28:01 +00:00
Bram Moolenaar
2a7aa83458
patch 8.2.4197: cannot use an import in the "expr" part of 'spellsuggest'
...
Problem: Cannot use an import in the "expr" part of 'spellsuggest'.
Solution: Set the script context when evaluating "expr" of 'spellsuggest'.
2022-01-23 17:59:06 +00:00
Bram Moolenaar
f4e88f2152
patch 8.2.4193: cannot use an import in 'charconvert'
...
Problem: Cannot use an import in 'charconvert'.
Solution: Set the script context when evaluating 'charconvert'. Also expand
script-local functions in 'charconvert'.
2022-01-23 14:17:28 +00:00
Bram Moolenaar
7ef4a2fe37
patch 8.2.4192: cannot use an import in 'printexpr'
...
Problem: Cannot use an import in 'printexpr'.
Solution: Set the script context when evaluating 'printexpr'.
2022-01-23 13:44:35 +00:00
Bram Moolenaar
36c2add7f8
patch 8.2.4186: cannot use an import in 'patchexpr'
...
Problem: Cannot use an import in 'patchexpr'.
Solution: Set the script context when evaluating 'patchexpr'. Do not
require 'patchexpr' to return a bool, it was ignored anyway.
2022-01-22 20:55:30 +00:00
Bram Moolenaar
39b8944539
patch 8.2.4182: memory leak when evaluating 'diffexpr'
...
Problem: Memory leak when evaluating 'diffexpr'.
Solution: Use free_tv() instead of clear_tv().
2022-01-22 18:21:36 +00:00
Bram Moolenaar
7b29f6a394
patch 8.2.4181: Vim9: cannot use an import in 'diffexpr'
...
Problem: Vim9: cannot use an import in 'diffexpr'.
Solution: Set the script context when evaluating 'diffexpr'. Do not require
'diffexpr' to return a bool, it was ignored anyway.
2022-01-22 17:58:13 +00:00
Bram Moolenaar
f0e7e6365e
patch 8.2.4171: cannot invoke option function using autoload import
...
Problem: Cannot invoke option function using autoload import.
Solution: Expand the import to an autoload function name. (closes #9578 )
2022-01-21 13:29:56 +00:00
Bram Moolenaar
dd5893be34
patch 8.2.4167: Vim9: error message for old style import
...
Problem: Vim9: error message for old style import.
Solution: Use another error message. Add a test.
2022-01-20 21:32:54 +00:00
Bram Moolenaar
d9d2fd0aa3
patch 8.2.4086: "cctx" argument of find_func_even_dead() is unused
...
Problem: "cctx" argument of find_func_even_dead() is unused.
Solution: Remove the argument.
2022-01-13 21:15:21 +00:00
Bram Moolenaar
130f65d46b
patch 8.2.4084: memory leak when looking for autoload prefixed variable
...
Problem: Memory leak when looking for autoload prefixed variable.
Solution: Free the concatenated string.
2022-01-13 20:39:41 +00:00
Bram Moolenaar
0e3e7ba05f
patch 8.2.4083: Vim9: no test for "vim9script autoload' using script variable
...
Problem: Vim9: no test for "vim9script autoload' and using script variable
in the same script.
Solution: Add a simple test. Fix uncovered problem.
2022-01-13 20:18:56 +00:00
Bram Moolenaar
fe2ef0b2cd
patch 8.2.4053: Vim9: autoload mechanism doesn't fully work yet
...
Problem: Vim9: autoload mechanism doesn't fully work yet.
Solution: Define functions and variables with their autoload name, add the
prefix when calling a function, find the variable in the table of
script variables.
2022-01-10 18:08:00 +00:00
Bram Moolenaar
dc4451df61
patch 8.2.4050: Vim9: need to prefix every item in an autoload script
...
Problem: Vim9: need to prefix every item in an autoload script.
Solution: First step in supporting "vim9script autoload" and "import
autoload".
2022-01-09 21:36:37 +00:00
Bram Moolenaar
04935fb17e
patch 8.2.4043: using int for second argument of ga_init2()
...
Problem: Using int for second argument of ga_init2().
Solution: Remove unnessary type cast (int) when using sizeof().
2022-01-08 16:19:22 +00:00
Bram Moolenaar
aa9b3cacd5
patch 8.2.4041: using unitialized pointer
...
Problem: Using unitialized pointer.
Solution: Store "ht" when variable is in another script.
2022-01-08 15:44:22 +00:00
Bram Moolenaar
71f21938bc
patch 8.2.4030: a script local funcref is not found from a mapping
...
Problem: A script local funcref is not found from a mapping.
Solution: When looking for a function, also find a script-local funcref.
(closes #9485 )
2022-01-07 18:20:55 +00:00
Bram Moolenaar
32884ad753
patch 8.2.4024: confusing error message if imported name is used directly
...
Problem: Confusing error message if imported name is used directly.
Solution: Give a better error message.
2022-01-07 12:45:29 +00:00