summaryrefslogtreecommitdiff
path: root/src/evalvars.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.2.4934: string interpolation fails when not evaluatingv8.2.4934Bram Moolenaar2022-05-101-9/+13
| | | | | Problem: String interpolation fails when not evaluating. Solution: Skip the expression when not evaluating. (closes #10398)
* patch 8.2.4930: interpolated string expression requires escapingv8.2.4930Bram Moolenaar2022-05-101-31/+43
| | | | | Problem: Interpolated string expression requires escaping. Solution: Do not require escaping in the expression.
* patch 8.2.4883: string interpolation only works in heredocv8.2.4883LemonBoy2022-05-061-32/+61
| | | | | | Problem: String interpolation only works in heredoc. Solution: Support interpolated strings. Use syntax for heredoc consistent with strings, similar to C#. (closes #10327)
* patch 8.2.4866: duplicate code in "get" functionsv8.2.4866LemonBoy2022-05-041-110/+84
| | | | | | Problem: Duplicate code in "get" functions. Solution: Use get_var_from() for getwinvar(), gettabvar(), gettabwinvar() and getbufvar(). (closes #10335)
* patch 8.2.4840: heredoc expression evaluated even when skippingv8.2.4840Bram Moolenaar2022-04-281-1/+1
| | | | | Problem: Heredoc expression evaluated even when skipping. Solution: Don't evaluate when "skip" is set. (closes #10306)
* patch 8.2.4804: expression in heredoc doesn't work for compiled functionv8.2.4804Yegappan Lakshmanan2022-04-211-14/+37
| | | | | | Problem: Expression in heredoc doesn't work for compiled function. Solution: Implement compiling the heredoc expressions. (Yegappan Lakshmanan, closes #10232)
* patch 8.2.4783: Coverity warns for leaking memoryv8.2.4783Bram Moolenaar2022-04-181-9/+3
| | | | | Problem: Coverity warns for leaking memory. Solution: Use another strategy freeing "theline".
* patch 8.2.4770: cannot easily mix expression and heredocv8.2.4770Yegappan Lakshmanan2022-04-171-13/+120
| | | | | Problem: Cannot easily mix expression and heredoc. Solution: Support in heredoc. (Yegappan Lakshmanan, closes #10138)
* patch 8.2.4754: using cached values after unsetting some environment variablesv8.2.4754LemonBoy2022-04-151-1/+1
| | | | | | Problem: Still using cached values after unsetting some known environment variables. Solution: Take care of the side effects. (closes #10194)
* patch 8.2.4753: error from setting an option is silently ignoredv8.2.4753Bram Moolenaar2022-04-151-1/+1
| | | | | Problem: Error from setting an option is silently ignored. Solution: Handle option value errors better. Fix uses of N_().
* patch 8.2.4698: Vim9: script variable has no flag that it was setv8.2.4698Bram Moolenaar2022-04-051-5/+19
| | | | | | 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)
* patch 8.2.4682: Vim9: can use :unlockvar for const variablev8.2.4682Bram Moolenaar2022-04-041-16/+35
| | | | | Problem: Vim9: can use :unlockvar for const variable. (Ernie Rael) Solution: Check whether the variable is a const.
* patch 8.2.4662: no error for using out of range list indexv8.2.4662Bram Moolenaar2022-04-011-3/+5
| | | | | | Problem: No error for using out of range list index. Solution: Check list index at script level like in compiled function. (closes #10051)
* patch 8.2.4642: Vim9: in :def function script var cannot be nullv8.2.4642Bram Moolenaar2022-03-281-1/+9
| | | | | | 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)
* patch 8.2.4635: tests using null list or dict failv8.2.4635Bram Moolenaar2022-03-271-2/+4
| | | | | Problem: Tests using null list or dict fail. Solution: Only use the new rules for Vim9 script.
* patch 8.2.4634: Vim9: cannot initialize a variable to null_listv8.2.4634Bram Moolenaar2022-03-271-10/+7
| | | | | | 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.
* patch 8.2.4600: Vim9: not enough test coverage for executing :def functionv8.2.4600Bram Moolenaar2022-03-201-24/+8
| | | | | Problem: Vim9: not enough test coverage for executing :def function. Solution: Add a few more tests. Fix inconsistencies.
* patch 8.2.4526: Vim9: cannot set variables to a null valuev8.2.4526Bram Moolenaar2022-03-081-0/+5
| | | | | Problem: Vim9: cannot set variables to a null value. Solution: Add null_list, null_job, etc.
* patch 8.2.4510: Vim9: shortening commands leads to confusing scriptv8.2.4510Bram Moolenaar2022-03-051-5/+0
| | | | | | | | | | 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".
* patch 8.2.4509: Vim9: can declare a variable with ":va"v8.2.4509Bram Moolenaar2022-03-051-1/+8
| | | | | Problem: Vim9: can declare a variable with ":va". Solution: Disallow using ":va", require using ":var".
* patch 8.2.4508: Vim9: cannot assign to a global variable on the command linev8.2.4508Bram Moolenaar2022-03-051-1/+3
| | | | | Problem: Vim9: cannot assign to a global variable on the command line. Solution: Allow using :vim9cmd for assignment on the command line.
* patch 8.2.4500: Vim9: can declare a global variable on the command linev8.2.4500Bram Moolenaar2022-03-031-1/+6
| | | | | Problem: Vim9: can declare a global variable on the command line. Solution: Disallow declaring a variable on the command line. (closes #9881)
* patch 8.2.4492: no error if an option is given a value with ":let &opt = val"v8.2.4492Bram Moolenaar2022-03-021-1/+4
| | | | | | Problem: No error if an option is given an invalid value with ":let &opt = val". Solution: Give the error. (closes #9864)
* patch 8.2.4487: Vim9: cannot compare with v:nullv8.2.4487Bram Moolenaar2022-03-011-18/+22
| | | | | Problem: Vim9: cannot compare with v:null. Solution: Allow comparing anything with v:null. (closes #9866)
* patch 8.2.4431: unnecessary condition when assigning to a variablev8.2.4431Bram Moolenaar2022-02-211-146/+142
| | | | | Problem: Unnecessary condition when assigning to a variable. Solution: Remove the condition.
* patch 8.2.4428: crash when switching tabpage while in the cmdline windowv8.2.4428Bram Moolenaar2022-02-201-12/+2
| | | | | Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
* patch 8.2.4395: some code lines not covered by testsv8.2.4395Bram Moolenaar2022-02-151-1/+2
| | | | | | Problem: Some code lines not covered by tests. Solution: Add a few more test cases. Fix getting more than one error for invalid assignment.
* patch 8.2.4375: ctx_imports is not usedv8.2.4375Bram Moolenaar2022-02-131-4/+4
| | | | | Problem: ctx_imports is not used. Solution: Delete ctx_imports. Add missing dependency.
* patch 8.2.4371: Vim9: can create a script variable from a legacy functionv8.2.4371Bram Moolenaar2022-02-131-0/+6
| | | | | Problem: Vim9: can create a script variable from a legacy function. Solution: Disallow creating a script variable from a function.
* patch 8.2.4318: various comment and indent mistakes, returning wrong zerov8.2.4318Bram Moolenaar2022-02-071-1/+2
| | | | | Problem: Various comment and indent mistakes, returning wrong zero. Solution: Fix the mistakes. Return NULL instead of FAIL.
* patch 8.2.4286: Vim9: strict type checking after copy() and deepcopy()v8.2.4286Bram Moolenaar2022-02-021-18/+1
| | | | | Problem: Vim9: strict type checking after copy() and deepcopy(). Solution: Allow type to change after making a copy. (closes #9644)
* patch 8.2.4260: Vim9: can still use a global function without g:v8.2.4260Bram Moolenaar2022-01-301-3/+6
| | | | | | 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)
* patch 8.2.4225: Vim9: depth argument of :lockvar not parsed in :def functionv8.2.4225Bram Moolenaar2022-01-261-4/+12
| | | | | | 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.
* patch 8.2.4209: partial in 'opfunc' cannot use an imported functionv8.2.4209Bram Moolenaar2022-01-241-7/+24
| | | | | Problem: partial in 'opfunc' cannot use an imported function. Solution: Also expand the function name in a partial. (closes #9614)
* patch 8.2.4197: cannot use an import in the "expr" part of 'spellsuggest'v8.2.4197Bram Moolenaar2022-01-231-0/+6
| | | | | Problem: Cannot use an import in the "expr" part of 'spellsuggest'. Solution: Set the script context when evaluating "expr" of 'spellsuggest'.
* patch 8.2.4193: cannot use an import in 'charconvert'v8.2.4193Bram Moolenaar2022-01-231-0/+8
| | | | | | Problem: Cannot use an import in 'charconvert'. Solution: Set the script context when evaluating 'charconvert'. Also expand script-local functions in 'charconvert'.
* patch 8.2.4192: cannot use an import in 'printexpr'v8.2.4192Bram Moolenaar2022-01-231-0/+8
| | | | | Problem: Cannot use an import in 'printexpr'. Solution: Set the script context when evaluating 'printexpr'.
* patch 8.2.4186: cannot use an import in 'patchexpr'v8.2.4186Bram Moolenaar2022-01-221-2/+13
| | | | | | 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.
* patch 8.2.4182: memory leak when evaluating 'diffexpr'v8.2.4182Bram Moolenaar2022-01-221-1/+1
| | | | | Problem: Memory leak when evaluating 'diffexpr'. Solution: Use free_tv() instead of clear_tv().
* patch 8.2.4181: Vim9: cannot use an import in 'diffexpr'v8.2.4181Bram Moolenaar2022-01-221-2/+13
| | | | | | 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.
* patch 8.2.4171: cannot invoke option function using autoload importv8.2.4171Bram Moolenaar2022-01-211-9/+41
| | | | | Problem: Cannot invoke option function using autoload import. Solution: Expand the import to an autoload function name. (closes #9578)
* patch 8.2.4167: Vim9: error message for old style importv8.2.4167Bram Moolenaar2022-01-201-1/+1
| | | | | Problem: Vim9: error message for old style import. Solution: Use another error message. Add a test.
* patch 8.2.4086: "cctx" argument of find_func_even_dead() is unusedv8.2.4086Bram Moolenaar2022-01-131-2/+2
| | | | | Problem: "cctx" argument of find_func_even_dead() is unused. Solution: Remove the argument.
* patch 8.2.4084: memory leak when looking for autoload prefixed variablev8.2.4084Bram Moolenaar2022-01-131-1/+1
| | | | | Problem: Memory leak when looking for autoload prefixed variable. Solution: Free the concatenated string.
* patch 8.2.4083: Vim9: no test for "vim9script autoload' using script variablev8.2.4083Bram Moolenaar2022-01-131-1/+27
| | | | | | Problem: Vim9: no test for "vim9script autoload' and using script variable in the same script. Solution: Add a simple test. Fix uncovered problem.
* patch 8.2.4053: Vim9: autoload mechanism doesn't fully work yetv8.2.4053Bram Moolenaar2022-01-101-11/+38
| | | | | | | 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.
* patch 8.2.4050: Vim9: need to prefix every item in an autoload scriptv8.2.4050Bram Moolenaar2022-01-091-3/+3
| | | | | | Problem: Vim9: need to prefix every item in an autoload script. Solution: First step in supporting "vim9script autoload" and "import autoload".
* patch 8.2.4043: using int for second argument of ga_init2()v8.2.4043Bram Moolenaar2022-01-081-1/+1
| | | | | Problem: Using int for second argument of ga_init2(). Solution: Remove unnessary type cast (int) when using sizeof().
* patch 8.2.4041: using unitialized pointerv8.2.4041Bram Moolenaar2022-01-081-0/+4
| | | | | Problem: Using unitialized pointer. Solution: Store "ht" when variable is in another script.
* patch 8.2.4030: a script local funcref is not found from a mappingv8.2.4030Bram Moolenaar2022-01-071-1/+30
| | | | | | 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)