| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Problem: Vim9: can use += with a :let command at script level.
Solution: Give an error.
|
|
|
|
|
| |
Problem: Vim9: error when setting an option with setbufvar().
Solution: Do not get a number from a string value. (closes #6740)
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Problem: :const only locks the variable, not the value.
Solution: Lock the value as ":lockvar 1 var" would do. (closes #6719)
|
|
|
|
|
| |
Problem: Vim9: cannot assign string to string option.
Solution: Change checks for option value. (closes #6720)
|
|
|
|
|
| |
Problem: Error messages are spread out.
Solution: Move more messages into errors.h.
|
|
|
|
|
|
| |
Problem: Vim9: declaring ascript variable at the script level does not
infer the type.
Solution: Get the type from the value. (closes #6716)
|
|
|
|
|
|
| |
Problem: Error messages are spread out and names can be confusing.
Solution: Start moving error messages to a separate file and use clear
names.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Problem: Vim9: no error for missing white space around operator.
Solution: Check for white space. (closes #6618)
|
|
|
|
|
| |
Problem: Vim9: no error using :let for options and registers.
Solution: Give an error. (closes #6568)
|
|
|
|
|
| |
Problem: Vim9: line break after "=" does not work.
Solution: Also allow for NUL after "=". (closes #6549)
|
|
|
|
|
| |
Problem: Vim9: optional argument type not parsed properly.
Solution: Skip over the "?". (issue #6507)
|
|
|
|
|
| |
Problem: The "trailing characters" error can be hard to understand.
Solution: Add the trailing characters to the message.
|
|
|
|
|
|
| |
Problem: Vim9: no error for missing white space in assignment at script
level.
Solution: Check for white space. (closes #6495)
|
|
|
|
|
| |
Problem: Cannot use a lambda with quickfix functions.
Solution: Add support for lambda. (Yegappan Lakshmanan, closes #6499)
|
|
|
|
|
| |
Problem: Vim9: checking for Vim9 syntax is spread out.
Solution: Use in_vim9script().
|
|
|
|
|
|
| |
Problem: Some tests fail.
Solution: Adjust tests for different assert_fails() behavior. Remove unused
variable.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Problem: Vim9: crash when using imported function.
Solution: Check for a function type. Set the script context when calling a
function. (closes #6412)
|
|
|
|
|
| |
Problem: Vim9: using :copen causes an error.
Solution: Add flag LET_NO_COMMAND in set_var().
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Problem: Vim9: no line break allowed in a while loop.
Solution: Update stored loop lines when finding line breaks.
|
|
|
|
|
| |
Problem: Vim9: no line break allowed in :if expression.
Solution: Skip linebreak.
|
|
|
|
|
| |
Problem: Vim9: no line break allowed inside a lambda.
Solution: Handle line break inside a lambda in Vim9 script.
|
|
|
|
|
| |
Problem: Expression "!expr->func()" does not work.
Solution: Apply plus and minus earlier. (closes #6348)
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Problem: Vim9: no error for declaring buffer, window, etc. variable.
Solution: Give an error. Unify the error messages.
|
|
|
|
|
| |
Problem: Vim9: no error for using "let g:var = val".
Solution: Add an error.
|
|
|
|
|
|
| |
Problem: Vim9: redefining a function uses a new index every time.
Solution: When redefining a function clear the contents and re-use the
index.
|
|
|
|
|
|
| |
Problem: Vim9: some code not tested.
Solution: Add a few more test cases. Reorder checks for clearer error.
Remove unreachable code.
|
|
|
|
|
| |
Problem: Getting directory contents is always case sorted.
Solution: Add sort options and v:collate. (Christian Brabandt, closes #6229)
|
|
|
|
|
| |
Problem: Vim9: cannot compile "[var, var] = list".
Solution: Implement list assignment.
|
|
|
|
|
| |
Problem: Vim9: type is not checked when assigning to a script variable.
Solution: Check the type.
|
|
|
|
|
| |
Problem: Vim9 script variable declarations need a type.
Solution: Make "let var: type" declare a script-local variable.
|
|
|
|
|
| |
Problem: Unnecessary type casts for vim_strnsave().
Solution: Remove the type casts.
|
|
|
|
|
| |
Problem: Cannot use :import in legacy Vim script.
Solution: Support :import in any Vim script.
|
|
|
|
|
| |
Problem: Duplicate code for evaluating expression argument.
Solution: Merge the code and make the use more flexible.
|
|
|
|
|
| |
Problem: Search() cannot skip over matches like searchpair() can.
Solution: Add an optional "skip" argument. (Christian Brabandt, closes #861)
|
|
|
|
|
| |
Problem: Code for resetting v:register is duplicated.
Solution: Add reset_reg_var().
|
|
|
|
|
| |
Problem: Vim9: code left over from discovery phase.
Solution: Remove the dead code.
|
|
|
|
|
| |
Problem: Compiler warning for unused variable.
Solution: Remove the variable.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Problem: Vim9: performance can be improved.
Solution: Don't call break. Inline check for list materialize. Make an
inline version of ga_grow().
|
|
|
|
|
| |
Problem: Vim9: cannot call a function declared later in Vim9 script.
Solution: Make two passes through the script file.
|
|
|
|
|
|
| |
Problem: Gcc warning for returning pointer to local variable. (John
Marriott)
Solution: Return another pointer.
|