summaryrefslogtreecommitdiff
path: root/src/vim9script.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 9.0.1271: using sizeof() and subtract array size is trickyv9.0.1271zeertzjq2023-02-011-1/+1
| | | | | Problem: Using sizeof() and subtract array size is tricky. Solution: Use offsetof() instead. (closes #11926)
* patch 9.0.1246: code is indented more than necessaryv9.0.1246Yegappan Lakshmanan2023-01-261-33/+34
| | | | | | Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11887)
* patch 9.0.1140: cannot call an object method in a compiled functionv9.0.1140Bram Moolenaar2023-01-031-1/+1
| | | | | Problem: Cannot call an object method in a compiled function. Solution: Compile the instructins to invoke an object method.
* patch 9.0.1133: error message names do not match the itemsv9.0.1133Bram Moolenaar2023-01-021-1/+1
| | | | | Problem: Error message names do not match the items. Solution: Add "_str" when the text contains "%s".
* patch 9.0.1031: Vim9 class is not implemented yetv9.0.1031Bram Moolenaar2022-12-081-3/+8
| | | | | Problem: Vim9 class is not implemented yet. Solution: Add very basic class support.
* patch 9.0.0949: crash when unletting a variable while listing variablesv9.0.0949Bram Moolenaar2022-11-251-2/+3
| | | | | | Problem: Crash when unletting a variable while listing variables. Solution: Disallow changing a hashtable while going over the entries. (closes #11435)
* patch 9.0.0687: "export def" does not work in a nested blockv9.0.0687Bram Moolenaar2022-10-071-40/+4
| | | | | | Problem: "export def" does not work in a nested block. Solution: Do not handle "export" with a separate function but in the same command stack. (closes #11304)
* patch 9.0.0685: FORTIFY_SOURCE causes a crash in Vim9 scriptv9.0.0685Yee Cheng Chin2022-10-071-2/+4
| | | | | Problem: FORTIFY_SOURCE causes a crash in Vim9 script. Solution: Use a pointer to the first char. (Yee Cheng Chin, closes #11302)
* patch 9.0.0253: a symlink to an autoload script results in two entriesv9.0.0253Bram Moolenaar2022-08-241-0/+14
| | | | | | | Problem: A symlink to an autoload script results in two entries in the list of scripts, items expected in one are actually in the other. Solution: Have one script item refer to the actually sourced one. (closes #10960)
* patch 9.0.0159: cannot build with small featuresv9.0.0159Bram Moolenaar2022-08-061-0/+4
| | | | | Problem: Cannot build with small features. Solution: Check for E1170 only with FEAT_EVAL.
* patch 9.0.0156: giving E1170 only in an expression is confusingv9.0.0156Bram Moolenaar2022-08-061-4/+7
| | | | | Problem: Giving E1170 only in an expression is confusing. Solution: Give E1170 for any "#{ comment". (closes #10855)
* patch 9.0.0150: error for using #{ in an expression is a bit confusingv9.0.0150Bram Moolenaar2022-08-061-2/+2
| | | | | | Problem: Error for using #{ in an expression is a bit confusing. Solution: Mention that this error is only given for an expression. Avoid giving the error more than once. (closes #10855)
* patch 8.2.5025: Vim9: a few lines not covered by testsv8.2.5025Bram Moolenaar2022-05-261-1/+1
| | | | | Problem: Vim9: a few lines not covered by tests. Solution: Add a few tests.
* patch 8.2.4869: expression in command block does not look after NLv8.2.4869Bram Moolenaar2022-05-051-1/+1
| | | | | Problem: Expression in command block does not look after NL. Solution: Skip over NL to check what follows. (closes #10358)
* patch 8.2.4822: setting ufunc to NULL twicev8.2.4822LemonBoy2022-04-241-1/+2
| | | | | Problem: Setting ufunc to NULL twice. Solution: Set ufunc to NULL in find_exported(). (closes #19275)
* patch 8.2.4821: crash when imported autoload script was deletedv8.2.4821Bram Moolenaar2022-04-241-0/+3
| | | | | | Problem: Crash when imported autoload script was deleted. Solution: Initialize local variable. (closes #10274) Give a more meaningful error message.
* patch 8.2.4753: error from setting an option is silently ignoredv8.2.4753Bram Moolenaar2022-04-151-1/+2
| | | | | 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-7/+9
| | | | | | 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-3/+5
| | | | | Problem: Vim9: can use :unlockvar for const variable. (Ernie Rael) Solution: Check whether the variable is a const.
* patch 8.2.4656: Vim9: can't use item from "import autoload" with autoload dirv8.2.4656Bram Moolenaar2022-03-311-0/+3
| | | | | | | Problem: Vim9: can't use items from "import autoload" with autoload directory name. Solution: Let sn_autoload_prefix overrule sn_import_autoload. (closes #10054)
* patch 8.2.4654: missing changes for import checkv8.2.4654Bram Moolenaar2022-03-311-1/+8
| | | | | Problem: Missing changes for import check. Solution: Add missing changes.
* patch 8.2.4650: "import autoload" only works with using 'runtimepath'v8.2.4650Bram Moolenaar2022-03-301-22/+50
| | | | | Problem: "import autoload" only works with using 'runtimepath'. Solution: Also support a relative and absolute file name.
* patch 8.2.4642: Vim9: in :def function script var cannot be nullv8.2.4642Bram Moolenaar2022-03-281-1/+8
| | | | | | 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.4607: sourcing buffer lines may lead to errors for conflictsv8.2.4607Yegappan Lakshmanan2022-03-221-10/+19
| | | | | Problem: Sourcing buffer lines may lead to errors for conflicts. Solution: Add the ++clear argument. (Yegappan Lakshmanan, closes #9991)
* patch 8.2.4594: need to write script to a file to be able to source themv8.2.4594Yegappan Lakshmanan2022-03-191-2/+2
| | | | | | Problem: Need to write script to a file to be able to source them. Solution: Make ":source" use lines from the current buffer. (Yegappan Lakshmanan et al., closes #9967)
* patch 8.2.4526: Vim9: cannot set variables to a null valuev8.2.4526Bram Moolenaar2022-03-081-0/+8
| | | | | Problem: Vim9: cannot set variables to a null value. Solution: Add null_list, null_job, etc.
* patch 8.2.4375: ctx_imports is not usedv8.2.4375Bram Moolenaar2022-02-131-1/+1
| | | | | Problem: ctx_imports is not used. Solution: Delete ctx_imports. Add missing dependency.
* patch 8.2.4333: cstack not always passed to where it is neededv8.2.4333Bram Moolenaar2022-02-081-1/+3
| | | | | Problem: cstack not always passed to where it is needed. Solution: Pass ctack through functions.
* patch 8.2.4332: Vim9: incomplete test for existing script variable in blockv8.2.4332Bram Moolenaar2022-02-081-1/+2
| | | | | Problem: Vim9: incomplete test for existing script variable in block. Solution: Add a couple more tests. Fix uncovered problem.
* patch 8.2.4330: Vim9: no error if script imports itselfv8.2.4330Bram Moolenaar2022-02-081-0/+6
| | | | | Problem: Vim9: no error if script imports itself. Solution: Give an error when a script imports itself.
* patch 8.2.4223: long/int compiler warnings; function arguments swappedv8.2.4223K.Takata2022-01-261-1/+1
| | | | | Problem: Long/int compiler warnings; function arguments swapped. Solution: Add type casts. Swap arguments. (Ken Takata, closes #9632)
* patch 8.2.4137: Vim9: calling import with and without method is inconsistentv8.2.4137Bram Moolenaar2022-01-181-5/+19
| | | | | | Problem: Vim9: calling import with and without method is inconsistent. Solution: Set a flag that a parenthsis follows to compile_load_scriptvar(). Add some more tests. Improve error message.
* patch 8.2.4136: Vim9: the "autoload" argument of ":vim9script" is not usefulv8.2.4136Bram Moolenaar2022-01-181-15/+0
| | | | | Problem: Vim9: the "autoload" argument of ":vim9script" is not useful. Solution: Remove the argument. (closes #9555)
* patch 8.2.4134: MS-Windows: test for import with absolute path failsv8.2.4134Bram Moolenaar2022-01-181-1/+7
| | | | | Problem: MS-Windows: test for import with absolute path fails. Solution: Handle path starting with slash as an absolute path.
* patch 8.2.4132: Vim9: wrong error message when autoload script can't be foundv8.2.4132Bram Moolenaar2022-01-181-2/+2
| | | | | Problem: Vim9: wrong error message when autoload script can't be found. Solution: Correct check for using autoload with wrong name.
* patch 8.2.4087: cannot test items from an autoload script easilyv8.2.4087Bram Moolenaar2022-01-131-0/+3
| | | | | Problem: Cannot test items from an autoload script easily. Solution: Add the "autoload" value for test_override().
* 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.4076: memory leak in autoload importv8.2.4076Bram Moolenaar2022-01-131-1/+2
| | | | | Problem: Memory leak in autoload import. Solution: Do not overwrite the autoload prefix.
* patch 8.2.4072: Vim9: compiling function fails when autoload is not loadedv8.2.4072Bram Moolenaar2022-01-121-1/+10
| | | | | | Problem: Vim9: compiling function fails when autoload script is not loaded yet. Solution: Depend on runtime loading.
* patch 8.2.4066: Vim9: imported autoload script loaded againv8.2.4066Bram Moolenaar2022-01-121-9/+16
| | | | | Problem: Vim9: imported autoload script loaded again. Solution: Do not create a new imported_T every time.
* patch 8.2.4057: Vim9: not fully implementing the autoload mechanismv8.2.4057Bram Moolenaar2022-01-101-1/+1
| | | | | Problem: Vim9: not fully implementing the autoload mechanism. Solution: Allow for exporting a legacy function. Improve test coverage.
* patch 8.2.4053: Vim9: autoload mechanism doesn't fully work yetv8.2.4053Bram Moolenaar2022-01-101-11/+28
| | | | | | | 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-21/+88
| | | | | | Problem: Vim9: need to prefix every item in an autoload script. Solution: First step in supporting "vim9script autoload" and "import autoload".
* patch 8.2.4044: Vim9: no error when importing the same script twicev8.2.4044Bram Moolenaar2022-01-081-12/+26
| | | | | Problem: Vim9: no error when importing the same script twice. Solution: Give an error, unless it is a reload.
* patch 8.2.4038: various code not used when features are disabledv8.2.4038Dominique Pelle2022-01-081-0/+2
| | | | | Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pellé, closes #9491)
* patch 8.2.4025: error for import not ending in .vim does not work for .vimrcv8.2.4025Bram Moolenaar2022-01-071-3/+7
| | | | | Problem: Error for import not ending in .vim does not work for .vimrc. Solution: Check that .vim is the end. (closes #9484)
* patch 8.2.4023: using uninitialized variablev8.2.4023Bram Moolenaar2022-01-061-1/+1
| | | | | Problem: Using uninitialized variable. Solution: Initialize "ufunc" also when an item is not exported.
* patch 8.2.4019: Vim9: import mechanism is too complicatedv8.2.4019Bram Moolenaar2022-01-061-195/+65
| | | | | Problem: Vim9: import mechanism is too complicated. Solution: Do not use the Javascript mechanism but a much simpler one.
* patch 8.2.3991: Vim9: error when extending dict<any>v8.2.3991Bram Moolenaar2022-01-031-1/+2
| | | | | | | Problem: Vim9: error when extending dict<any> with another type that it was initialized with. Solution: Also set the type for dict<any> if the initializer has a more specific type. (closes #9461)
* patch 8.2.3967: error messages are spread outv8.2.3967Bram Moolenaar2022-01-011-1/+1
| | | | | Problem: Error messages are spread out. Solution: Move more errors to errors.h.