summaryrefslogtreecommitdiff
path: root/src/evalvars.c
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* patch 8.2.4024: confusing error message if imported name is used directlyv8.2.4024Bram Moolenaar2022-01-071-3/+4
| | | | | Problem: Confusing error message if imported name is used directly. Solution: Give a better error message.
* patch 8.2.4019: Vim9: import mechanism is too complicatedv8.2.4019Bram Moolenaar2022-01-061-56/+49
| | | | | Problem: Vim9: import mechanism is too complicated. Solution: Do not use the Javascript mechanism but a much simpler one.
* patch 8.2.4018: ml_get error when win_execute redraws with Visual selectionv8.2.4018Bram Moolenaar2022-01-061-12/+10
| | | | | Problem: ml_get error when win_execute redraws with Visual selection. Solution: Disable Visual area temporarily. (closes #9479)
* patch 8.2.4012: error messages are spread outv8.2.4012Bram Moolenaar2022-01-051-8/+8
| | | | | Problem: Error messages are spread out. Solution: Move the last error messages to errors.h.
* patch 8.2.4008: error messages are spread outv8.2.4008Bram Moolenaar2022-01-051-1/+1
| | | | | Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
* patch 8.2.4005: error messages are spread outv8.2.4005Bram Moolenaar2022-01-041-6/+5
| | | | | Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
* patch 8.2.3986: error messages are spread outv8.2.3986Bram Moolenaar2022-01-021-1/+1
| | | | | Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
* patch 8.2.3972: error messages are spread outv8.2.3972Bram Moolenaar2022-01-011-2/+2
| | | | | Problem: Error messages are spread out. Solution: Move the last errors from globals.h to errors.h.
* patch 8.2.3970: error messages are spread outv8.2.3970Bram Moolenaar2022-01-011-5/+5
| | | | | Problem: Error messages are spread out. Solution: Move more errors to errors.h.