summaryrefslogtreecommitdiff
path: root/src/vim9cmds.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 9.0.1557: test failures for unreachable codev9.0.1557Bram Moolenaar2023-05-141-1/+2
| | | | | Problem: Test failures for unreachable code. Solution: Add a test override to ignore unreachable code.
* patch 9.0.1363: crash when :def function has :break in skipped blockv9.0.1363Bram Moolenaar2023-02-271-1/+4
| | | | | Problem: Crash when :def function has :break in skipped block. (Ernie Rael) Solution: Don't generate a jump for a skipped :break. (closes #12077)
* patch 9.0.1266: error for space before ": type" is inconsistentv9.0.1266Bram Moolenaar2023-01-301-1/+6
| | | | | Problem: Error for space before ": type" is inconsistent. Solution: Give E1059 in more places. (closes #11868)
* patch 9.0.1250: cannot use an object method with :deferv9.0.1250Bram Moolenaar2023-01-271-3/+11
| | | | | | Problem: Cannot use an object method with :defer. (Ernie Rael) Solution: Find the object method and generate code to call it. (closes #11886)
* 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.1108: type error when using "any" type and adding to floatv9.0.1108Bram Moolenaar2022-12-291-5/+5
| | | | | Problem: Type error when using "any" type and adding a number to a float. Solution: Accept both a number and a float. (closes #11753)
* patch 9.0.1094: compiler warning when HAS_MESSAGE_WINDOW is not definedv9.0.1094Bram Moolenaar2022-12-251-1/+5
| | | | | Problem: Compiler warning when HAS_MESSAGE_WINDOW is not defined. Solution: Add UNUSED.
* patch 9.0.1074: class members are not supported yetv9.0.1074Bram Moolenaar2022-12-181-1/+1
| | | | | Problem: Class members are not supported yet. Solution: Add initial support for class members.
* patch 9.0.0992: Vim9 script: get E1096 when comment follows returnv9.0.0992mityu2022-12-021-1/+2
| | | | | Problem: Vim9 script: get E1096 when comment follows return. Solution: Adjust condition for return without expression. (closes #11654)
* patch 9.0.0828: various typosv9.0.0828dundargoc2022-11-021-1/+1
| | | | | Problem: Various typos. Solution: Correct typos. (closes #11432)
* patch 9.0.0742: reading past end of the line when compiling a functionv9.0.0742Bram Moolenaar2022-10-131-26/+36
| | | | | | Problem: Reading past end of the line when compiling a function with errors. Solution: Do not return an invalid pointer. Fix skipping redirection.
* patch 9.0.0726: looping over list of lists works in script, not in functionv9.0.0726Bram Moolenaar2022-10-111-1/+1
| | | | | | Problem: Looping over list of lists and changing the list contents works in Vim9 script, not in a compiled function. Solution: Mark the loop variable final instead of const. (closes #11347)
* patch 9.0.0724: closure in compiled function gets same variable in blockv9.0.0724Bram Moolenaar2022-10-111-17/+15
| | | | | | Problem: Closure in compiled function gets same variable in block. Solution: At the end of a block to not always reset the variable count. (issue #11094)
* patch 9.0.0683: cannot specify a time for :echowindowv9.0.0683Bram Moolenaar2022-10-071-8/+10
| | | | | | Problem: Cannot specify a time for :echowindow. Solution: A count can be used to specify the display time. Add popup_findecho().
* patch 9.0.0627: "const" and "final" both make the type a constantv9.0.0627Bram Moolenaar2022-09-301-4/+5
| | | | | | Problem: "const" and "final" both make the type a constant. (Daniel Steinberg) Solution: Only have "const" make the type a constant.
* patch 9.0.0502: a closure in a nested loop in a :def function does not workv9.0.0502Bram Moolenaar2022-09-191-35/+95
| | | | | Problem: A closure in a nested loop in a :def function does not work. Solution: Use an array of loopvars, one per loop level.
* patch 9.0.0484: in :def function all closures in loop get the same variablesv9.0.0484Bram Moolenaar2022-09-171-61/+77
| | | | | Problem: In a :def function all closures in a loop get the same variables. Solution: Add ENDLOOP at break, continue and return if needed.
* patch 9.0.0481: in :def function all closures in loop get the same variablesv9.0.0481Bram Moolenaar2022-09-161-0/+43
| | | | | | Problem: In a :def function all closures in a loop get the same variables. Solution: Use a separate list of variables for LOADOUTER and STOREOUTER. Not copied at end of loop yet.
* patch 9.0.0470: in :def function all closures in loop get the same variablesv9.0.0470Bram Moolenaar2022-09-151-24/+102
| | | | | | Problem: In a :def function all closures in a loop get the same variables. Solution: When in a loop and a closure refers to a variable declared in the loop, prepare for making a copy of variables for each closure.
* patch 9.0.0420: function went missingv9.0.0420Bram Moolenaar2022-09-081-0/+21
| | | | | Problem: Function went missing. Solution: Add the function back.
* patch 9.0.0419: the :defer command does not check the function argumentsv9.0.0419Bram Moolenaar2022-09-081-28/+18
| | | | | | Problem: The :defer command does not check the function argument count and types. Solution: Check the function arguments when adding a deferred function.
* Revert part of patch merged twiceBram Moolenaar2022-09-041-21/+0
|
* patch 9.0.0380: deleting files in tests is a hasslev9.0.0380Bram Moolenaar2022-09-041-0/+21
| | | | | Problem: Deleting files in tests is a hassle. Solution: Use the new 'D' flag of writefile().
* patch 9.0.0379: cleaning up after writefile() is a hasslev9.0.0379Bram Moolenaar2022-09-041-11/+26
| | | | | | Problem: Cleaning up after writefile() is a hassle. Solution: Add the 'D' flag to defer deleting the written file. Very useful in tests.
* patch 9.0.0370: cleaning up afterwards can make a function messyv9.0.0370Bram Moolenaar2022-09-031-0/+64
| | | | | Problem: Cleaning up afterwards can make a function messy. Solution: Add the :defer command.
* patch 9.0.0350: :echowindow does not work in a compiled functionv9.0.0350Bram Moolenaar2022-09-011-0/+4
| | | | | Problem: :echowindow does not work in a compiled function. Solution: Handle the expression at compile time.
* patch 9.0.0212: invalid memory access when compiling :unletv9.0.0212Bram Moolenaar2022-08-141-0/+6
| | | | | Problem: Invalid memory access when compiling :unlet. Solution: Don't read past the end of the line.
* patch 9.0.0211: invalid memory access when compiling :lockvarv9.0.0211Bram Moolenaar2022-08-141-2/+7
| | | | | Problem: Invalid memory access when compiling :lockvar. Solution: Don't read past the end of the line.
* patch 8.2.4823: concat more than 2 strings in :def function is inefficientv8.2.4823LemonBoy2022-04-251-1/+1
| | | | | | Problem: Concatenating more than 2 strings in a :def function is inefficient. Solution: Add a count to the CONCAT instruction. (closes #10276)
* patch 8.2.4666: Vim9: assignment not recognized in skipped blockv8.2.4666Bram Moolenaar2022-04-021-2/+2
| | | | | Problem: Vim9: assignment not recognized in skipped block. Solution: When skipping assume identifier exists. (closes #10059)
* patch 8.2.4615: mapping with escaped bar does not work in :def functionv8.2.4615Bram Moolenaar2022-03-231-1/+1
| | | | | | Problem: Mapping with escaped bar does not work in :def function. (Sergey Vlasov) Solution: Do not remove the backslash. (closes #10002)
* patch 8.2.4610: some conditions are always truev8.2.4610Bram Moolenaar2022-03-221-2/+1
| | | | | Problem: Some conditions are always true. Solution: Remove the useless conditions. (closes #9993)
* patch 8.2.4572: Vim9: return type "any" is changed to first returned typev8.2.4572Bram Moolenaar2022-03-151-2/+1
| | | | | | Problem: Vim9: return type "any" is sometimes changed to first returned type. (Virginia Senioria) Solution: Do not change the return type if declared as "any". (closes #9949)
* patch 8.2.4552: in a :def function "put = expr" does not workv8.2.4552Bram Moolenaar2022-03-121-1/+1
| | | | | Problem: In a :def function "put = expr" does not work. Solution: Skip over white space. (closes #9936)
* patch 8.2.4542: Vim9: "break" inside try/catch not handled correctlyv8.2.4542Bram Moolenaar2022-03-101-6/+20
| | | | | Problem: Vim9: "break" inside try/catch not handled correctly. Solution: First jump to :endtry. (closes #9927)
* patch 8.2.4471: Coverity warns for uninitialized variablev8.2.4471Bram Moolenaar2022-02-251-1/+1
| | | | | Problem: Coverity warns for uninitialized variable. Solution: Set flags to zero.
* patch 8.2.4318: various comment and indent mistakes, returning wrong zerov8.2.4318Bram Moolenaar2022-02-071-3/+3
| | | | | Problem: Various comment and indent mistakes, returning wrong zero. Solution: Fix the mistakes. Return NULL instead of FAIL.
* patch 8.2.4285: Vim9: type of item in for loop not checked properlyv8.2.4285Bram Moolenaar2022-02-021-7/+2
| | | | | Problem: Vim9: type of item in for loop not checked properly. Solution: Adjust the type checking. (closes #9683)
* patch 8.2.4227: Vim9: using "lockvar!" in :def function does not workv8.2.4227Bram Moolenaar2022-01-261-4/+6
| | | | | Problem: Vim9: using "lockvar!" in :def function does not work. Solution: Add "!" instead of "-1". (closes #9634)
* patch 8.2.4225: Vim9: depth argument of :lockvar not parsed in :def functionv8.2.4225Bram Moolenaar2022-01-261-3/+20
| | | | | | 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.4178: Vim9: invalid error for return type of lambda when debuggingv8.2.4178Bram Moolenaar2022-01-221-1/+4
| | | | | Problem: Vim9: invalid error for return type of lambda when debugging. Solution: Do not check the return type of a lambda. (closes #9589)
* patch 8.2.4138: Vim9: no error for return with argument when invalidv8.2.4138Bram Moolenaar2022-01-181-7/+5
| | | | | | Problem: Vim9: no error for return with argument when the function does not return anything. Solution: Give an error for the invalid argument. (issue #9497)
* patch 8.2.4071: Vim9: no detection of return in try/endtryv8.2.4071Bram Moolenaar2022-01-121-0/+11
| | | | | | Problem: Vim9: no detection of return in try/endtry. (Dominique Pellé) Solution: Check if any of the blocks inside try/endtry did not end in return.
* patch 8.2.4021: missing part of the :import changesv8.2.4021Bram Moolenaar2022-01-061-10/+10
| | | | | Problem: Missing part of the :import changes. Solution: Add changes in vim9cmds.c.
* patch 8.2.3996: Vim9: type checking lacks information about declared typev8.2.3996Bram Moolenaar2022-01-041-16/+14
| | | | | | | Problem: Vim9: type checking for list and dict lacks information about declared type. Solution: Add dv_decl_type and lv_decl_type. Refactor the type stack to store two types in each entry.
* patch 8.2.3981: Vim9: debugging a for loop doesn't stop before it startsv8.2.3981Bram Moolenaar2022-01-021-16/+22
| | | | | | Problem: Vim9: debugging a for loop doesn't stop before it starts. Solution: Keep the DEBUG instruction before the expression is evaluated. (closes #9456)
* patch 8.2.3972: error messages are spread outv8.2.3972Bram Moolenaar2022-01-011-3/+3
| | | | | 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-4/+4
| | | | | Problem: Error messages are spread out. Solution: Move more errors to errors.h.
* patch 8.2.3961: error messages are spread outv8.2.3961Bram Moolenaar2021-12-311-6/+6
| | | | | Problem: Error messages are spread out. Solution: Move more errors to errors.h.
* patch 8.2.3957: error messages are spread outv8.2.3957Bram Moolenaar2021-12-311-3/+3
| | | | | Problem: Error messages are spread out. Solution: Move more errors to errors.h.