summaryrefslogtreecommitdiff
path: root/src/evalvars.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.2.1527: Vim9: cannot use a function name at script levelv8.2.1527Bram Moolenaar2020-08-271-0/+14
| | | | | | 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)
* patch 8.2.1504: Vim9: white space checks are only done for a :def functionv8.2.1504Bram Moolenaar2020-08-211-1/+1
| | | | | | 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.
* patch 8.2.1502: Vim9: can use += with a :let command at script levelv8.2.1502Bram Moolenaar2020-08-211-1/+7
| | | | | Problem: Vim9: can use += with a :let command at script level. Solution: Give an error.
* patch 8.2.1489: Vim9: error when setting an option with setbufvar()v8.2.1489Bram Moolenaar2020-08-191-21/+20
| | | | | Problem: Vim9: error when setting an option with setbufvar(). Solution: Do not get a number from a string value. (closes #6740)
* patch 8.2.1473: items in a list given to :const can still be modifiedv8.2.1473Bram Moolenaar2020-08-171-12/+21
| | | | | | 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.
* patch 8.2.1471: :const only locks the variable, not the valuev8.2.1471Bram Moolenaar2020-08-161-1/+1
| | | | | Problem: :const only locks the variable, not the value. Solution: Lock the value as ":lockvar 1 var" would do. (closes #6719)
* patch 8.2.1469: Vim9: cannot assign string to string optionv8.2.1469Bram Moolenaar2020-08-161-14/+28
| | | | | Problem: Vim9: cannot assign string to string option. Solution: Change checks for option value. (closes #6720)
* patch 8.2.1460: error messages are spread outv8.2.1460Bram Moolenaar2020-08-151-3/+3
| | | | | Problem: Error messages are spread out. Solution: Move more messages into errors.h.
* patch 8.2.1459: Vim9: declaring script var in script does not infer the typev8.2.1459Bram Moolenaar2020-08-151-1/+4
| | | | | | Problem: Vim9: declaring ascript variable at the script level does not infer the type. Solution: Get the type from the value. (closes #6716)
* patch 8.2.1444: error messages are spread out and names can be confusingv8.2.1444Bram Moolenaar2020-08-131-1/+1
| | | | | | Problem: Error messages are spread out and names can be confusing. Solution: Start moving error messages to a separate file and use clear names.
* patch 8.2.1395: Vim9: no error if declaring a funcref with lower case letterv8.2.1395Bram Moolenaar2020-08-081-2/+2
| | | | | 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.
* patch 8.2.1365: Vim9: no error for missing white space around operatorv8.2.1365Bram Moolenaar2020-08-051-3/+6
| | | | | Problem: Vim9: no error for missing white space around operator. Solution: Check for white space. (closes #6618)
* patch 8.2.1355: Vim9: no error using :let for options and registersv8.2.1355Bram Moolenaar2020-08-021-6/+8
| | | | | Problem: Vim9: no error using :let for options and registers. Solution: Give an error. (closes #6568)
* patch 8.2.1324: Vim9: line break after "=" does not workv8.2.1324Bram Moolenaar2020-07-291-2/+3
| | | | | Problem: Vim9: line break after "=" does not work. Solution: Also allow for NUL after "=". (closes #6549)
* patch 8.2.1300: Vim9: optional argument type not parsed properlyv8.2.1300Bram Moolenaar2020-07-261-1/+1
| | | | | Problem: Vim9: optional argument type not parsed properly. Solution: Skip over the "?". (issue #6507)
* patch 8.2.1281: the "trailing characters" error can be hard to understandv8.2.1281Bram Moolenaar2020-07-231-5/+5
| | | | | Problem: The "trailing characters" error can be hard to understand. Solution: Add the trailing characters to the message.
* patch 8.2.1274: Vim9: no error for missing white space at script levelv8.2.1274Bram Moolenaar2020-07-231-7/+21
| | | | | | Problem: Vim9: no error for missing white space in assignment at script level. Solution: Check for white space. (closes #6495)
* patch 8.2.1255: cannot use a lambda with quickfix functionsv8.2.1255Bram Moolenaar2020-07-201-0/+21
| | | | | Problem: Cannot use a lambda with quickfix functions. Solution: Add support for lambda. (Yegappan Lakshmanan, closes #6499)
* patch 8.2.1190: Vim9: checking for Vim9 syntax is spread outv8.2.1190Bram Moolenaar2020-07-121-13/+9
| | | | | Problem: Vim9: checking for Vim9 syntax is spread out. Solution: Use in_vim9script().
* patch 8.2.1184: some tests failv8.2.1184Bram Moolenaar2020-07-111-1/+0
| | | | | | Problem: Some tests fail. Solution: Adjust tests for different assert_fails() behavior. Remove unused variable.
* patch 8.2.1183: assert_fails() checks the last error messagev8.2.1183Bram Moolenaar2020-07-111-6/+3
| | | | | | 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.
* patch 8.2.1154: Vim9: crash when using imported functionv8.2.1154Bram Moolenaar2020-07-081-9/+25
| | | | | | Problem: Vim9: crash when using imported function. Solution: Check for a function type. Set the script context when calling a function. (closes #6412)
* patch 8.2.1126: Vim9: using :copen causes an errorv8.2.1126Bram Moolenaar2020-07-041-1/+1
| | | | | Problem: Vim9: using :copen causes an error. Solution: Add flag LET_NO_COMMAND in set_var().
* patch 8.2.1111: inconsistent naming of get_list_tv() and eval_dict()v8.2.1111Bram Moolenaar2020-07-011-5/+5
| | | | | | 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.
* patch 8.2.1079: Vim9: no line break allowed in a while loopv8.2.1079Bram Moolenaar2020-06-281-2/+5
| | | | | Problem: Vim9: no line break allowed in a while loop. Solution: Update stored loop lines when finding line breaks.
* patch 8.2.1076: Vim9: no line break allowed in :if expressionv8.2.1076Bram Moolenaar2020-06-271-1/+1
| | | | | Problem: Vim9: no line break allowed in :if expression. Solution: Skip linebreak.
* patch 8.2.1071: Vim9: no line break allowed inside a lambdav8.2.1071Bram Moolenaar2020-06-271-2/+4
| | | | | Problem: Vim9: no line break allowed inside a lambda. Solution: Handle line break inside a lambda in Vim9 script.
* patch 8.2.1067: expression "!expr->func()" does not workv8.2.1067Bram Moolenaar2020-06-271-4/+3
| | | | | Problem: Expression "!expr->func()" does not work. Solution: Apply plus and minus earlier. (closes #6348)
* patch 8.2.1049: Vim9: leaking memory when using continuation linev8.2.1049Bram Moolenaar2020-06-241-1/+1
| | | | | | 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.
* patch 8.2.1047: Vim9: script cannot use line continuation like :def functionv8.2.1047Bram Moolenaar2020-06-241-5/+8
| | | | | | 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.
* patch 8.2.1028: Vim9: no error for declaring buffer, window, etc. variablev8.2.1028Bram Moolenaar2020-06-211-5/+13
| | | | | Problem: Vim9: no error for declaring buffer, window, etc. variable. Solution: Give an error. Unify the error messages.
* patch 8.2.1024: Vim9: no error for using "let g:var = val"v8.2.1024Bram Moolenaar2020-06-201-0/+8
| | | | | Problem: Vim9: no error for using "let g:var = val". Solution: Add an error.
* patch 8.2.1023: Vim9: redefining a function uses a new index every timev8.2.1023Bram Moolenaar2020-06-201-1/+1
| | | | | | Problem: Vim9: redefining a function uses a new index every time. Solution: When redefining a function clear the contents and re-use the index.
* patch 8.2.1011: Vim9: some code not testedv8.2.1011Bram Moolenaar2020-06-191-5/+6
| | | | | | Problem: Vim9: some code not tested. Solution: Add a few more test cases. Reorder checks for clearer error. Remove unreachable code.
* patch 8.2.0988: getting directory contents is always case sortedv8.2.0988Bram Moolenaar2020-06-161-0/+1
| | | | | Problem: Getting directory contents is always case sorted. Solution: Add sort options and v:collate. (Christian Brabandt, closes #6229)
* patch 8.2.0981: Vim9: cannot compile "[var, var] = list"v8.2.0981Bram Moolenaar2020-06-141-11/+17
| | | | | Problem: Vim9: cannot compile "[var, var] = list". Solution: Implement list assignment.
* patch 8.2.0973: Vim9: type is not checked when assigning to a script variablev8.2.0973Bram Moolenaar2020-06-131-5/+10
| | | | | Problem: Vim9: type is not checked when assigning to a script variable. Solution: Check the type.
* patch 8.2.0972: Vim9 script variable declarations need a typev8.2.0972Bram Moolenaar2020-06-131-2/+12
| | | | | Problem: Vim9 script variable declarations need a type. Solution: Make "let var: type" declare a script-local variable.
* patch 8.2.0967: unnecessary type casts for vim_strnsave()v8.2.0967Bram Moolenaar2020-06-121-1/+1
| | | | | Problem: Unnecessary type casts for vim_strnsave(). Solution: Remove the type casts.
* patch 8.2.0960: cannot use :import in legacy Vim scriptv8.2.0960Bram Moolenaar2020-06-111-2/+6
| | | | | Problem: Cannot use :import in legacy Vim script. Solution: Support :import in any Vim script.
* patch 8.2.0918: duplicate code for evaluating expression argumentv8.2.0918Bram Moolenaar2020-06-071-75/+0
| | | | | Problem: Duplicate code for evaluating expression argument. Solution: Merge the code and make the use more flexible.
* patch 8.2.0915: search() cannot skip over matches like searchpair() canv8.2.0915Bram Moolenaar2020-06-061-0/+75
| | | | | Problem: Search() cannot skip over matches like searchpair() can. Solution: Add an optional "skip" argument. (Christian Brabandt, closes #861)
* patch 8.2.0913: code for resetting v:register is duplicatedv8.2.0913Bram Moolenaar2020-06-061-1/+19
| | | | | Problem: Code for resetting v:register is duplicated. Solution: Add reset_reg_var().
* patch 8.2.0822: Vim9: code left over from discovery phasev8.2.0822Bram Moolenaar2020-05-251-16/+2
| | | | | Problem: Vim9: code left over from discovery phase. Solution: Remove the dead code.
* patch 8.2.0819: compiler warning for unused variablev8.2.0819Bram Moolenaar2020-05-241-1/+0
| | | | | Problem: Compiler warning for unused variable. Solution: Remove the variable.
* patch 8.2.0818: Vim9: using a discovery phase doesn't work wellv8.2.0818Bram Moolenaar2020-05-241-28/+9
| | | | | | Problem: Vim9: using a discovery phase doesn't work well. Solution: Remove the discovery phase, instead compile a function only when it is used. Add :defcompile to compile def functions earlier.
* patch 8.2.0753: Vim9: expressions are evaluated in the discovery phasev8.2.0753Bram Moolenaar2020-05-141-27/+51
| | | | | | 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.
* patch 8.2.0751: Vim9: performance can be improvedv8.2.0751Bram Moolenaar2020-05-131-1/+1
| | | | | | Problem: Vim9: performance can be improved. Solution: Don't call break. Inline check for list materialize. Make an inline version of ga_grow().
* patch 8.2.0725: Vim9: cannot call a function declared later in Vim9 scriptv8.2.0725Bram Moolenaar2020-05-091-5/+12
| | | | | Problem: Vim9: cannot call a function declared later in Vim9 script. Solution: Make two passes through the script file.
* patch 8.2.0718: gcc warning for returning pointer to local variablev8.2.0718Bram Moolenaar2020-05-091-1/+3
| | | | | | Problem: Gcc warning for returning pointer to local variable. (John Marriott) Solution: Return another pointer.