0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

534 Commits

Author SHA1 Message Date
Bram Moolenaar
8fa745e7be patch 9.0.0481: in :def function all closures in loop get the same variables
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.
2022-09-16 19:04:24 +01:00
Bram Moolenaar
b46c083a5e patch 9.0.0470: in :def function all closures in loop get the same variables
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.
2022-09-15 17:19:37 +01:00
Bram Moolenaar
f5fec05c7f patch 9.0.0440: crash when using mkdir() with "R" flag in compiled function
Problem:    Crash when using mkdir() with "R" flag in compiled function.
Solution:   Reserve a variable for deferred function calls.  Handle more than
            one argument.
2022-09-11 11:49:22 +01:00
Bram Moolenaar
6de2296e5e patch 9.0.0432: crash when using for loop variable in closure
Problem:    Crash when using for loop variable in closure.
Solution:   Check that the variable wasn't deleted. (issue #11094)
2022-09-09 21:35:36 +01:00
Bram Moolenaar
c9c967da09 patch 9.0.0405: arguments in a partial not used by a :def function
Problem:    Arguments in a partial not used by a :def function.
Solution:   Put the partial arguments on the stack.
2022-09-07 16:48:46 +01:00
Bram Moolenaar
98aff658d5 patch 9.0.0399: using :defer in expression funcref not tested
Problem:    Using :defer in expression funcref not tested.
Solution:   Add a test.  Fix uncovered problems.
2022-09-06 21:02:35 +01:00
Bram Moolenaar
ca16c60f33 patch 9.0.0398: members of funccall_T are inconsistently named
Problem:    Members of funccall_T are inconsistently named.
Solution:   Use the "fc_" prefix for all members.
2022-09-06 18:57:08 +01:00
Bram Moolenaar
58779858fb patch 9.0.0397: :defer not tested with exceptions and ":qa!"
Problem:    :defer not tested with exceptions and ":qa!".
Solution:   Test :defer works when exceptions are thrown and when ":qa!" is
            used.  Invoke the deferred calls on exit.
2022-09-06 18:31:14 +01:00
Bram Moolenaar
31ea6bf530 patch 9.0.0382: freeing the wrong string on failure
Problem:    Freeing the wrong string on failure.
Solution:   Adjust the argument.  Reorder the code.
2022-09-05 10:47:13 +01:00
Bram Moolenaar
806a273f3c patch 9.0.0379: cleaning up after writefile() is a hassle
Problem:    Cleaning up after writefile() is a hassle.
Solution:   Add the 'D' flag to defer deleting the written file.  Very useful
            in tests.
2022-09-04 15:40:36 +01:00
Bram Moolenaar
a5348f241b patch 9.0.0373: Coverity warns for NULL check and unused return value
Problem:    Coverity warns for NULL check and unused return value.
Solution:   Remove the NULL check, it was already checked earlier.  Add (void)
            to ignore the return value.
2022-09-04 11:42:22 +01:00
Bram Moolenaar
1d84f7608f patch 9.0.0370: cleaning up afterwards can make a function messy
Problem:    Cleaning up afterwards can make a function messy.
Solution:   Add the :defer command.
2022-09-03 21:35:53 +01:00
Bram Moolenaar
7d7ad7b2e8 patch 9.0.0350: :echowindow does not work in a compiled function
Problem:    :echowindow does not work in a compiled function.
Solution:   Handle the expression at compile time.
2022-09-01 16:00:53 +01:00
Bram Moolenaar
bd683e3a79 patch 9.0.0056: wrong line number reported when :cexpr fails in :def function
Problem:    Wrong line number reported when :cexpr fails in :def function.
Solution:   Set line_number before executing :cexpr. (closes #10735)
2022-07-18 17:49:03 +01:00
Matvey Tarasov
d14bb1aef9 patch 9.0.0004: plural messages not translated properly
Problem:    Plural messages not translated properly.
Solution:   Use ngettext() in a few more places. (Matvey Tarasov,
            closes #10606)
2022-06-29 13:18:27 +01:00
Bram Moolenaar
68e64d2c17 patch 8.2.5006: asan warns for undefined behavior
Problem:    Asan warns for undefined behavior.
Solution:   Cast the shifted value to unsigned.
2022-05-22 22:07:52 +01:00
Bram Moolenaar
338bf58eba patch 8.2.5004: right shift on negative number does not work as documented
Problem:    Right shift on negative number does not work as documented.
Solution:   Use a uvarnumber_T type cast.
2022-05-22 20:16:32 +01:00
Yegappan Lakshmanan
a061f34191 patch 8.2.5003: cannot do bitwise shifts
Problem:    Cannot do bitwise shifts.
Solution:   Add the >> and << operators. (Yegappan Lakshmanan, closes #8457)
2022-05-22 19:13:49 +01:00
Bram Moolenaar
dafef51b1c patch 8.2.4995: still a compiler warning for possibly uninitialized variable
Problem:    Still a compiler warning for possibly uninitialized variable.
            (Tony Mechelynck)
Solution:   Initialize variables.
2022-05-21 21:55:55 +01:00
Bram Moolenaar
5a01caa904 patch 8.2.4992: compiler warning for possibly uninitialized variable
Problem:    Compiler warning for possibly uninitialized variable. (Tony
            Mechelynck)
Solution:   Initialize variable in the caller instead of in the function.
2022-05-21 18:56:58 +01:00
Bram Moolenaar
f79d9dd43f patch 8.2.4989: cannot specify a function name for :defcompile
Problem:    Cannot specify a function name for :defcompile.
Solution:   Implement a function name argument for :defcompile.
2022-05-21 15:39:02 +01:00
Bram Moolenaar
b1040dc11f patch 8.2.4976: Coverity complains about not restoring a saved value
Problem:    Coverity complains about not restoring a saved value.
Solution:   Restore value before handling error.
2022-05-18 11:00:48 +01:00
Bram Moolenaar
bd3a9d2c94 patch 8.2.4973: Vim9: type error for list unpack mentions argument
Problem:    Vim9: type error for list unpack mentions argument.
Solution:   Mention variable. (close #10435)
2022-05-17 16:12:39 +01:00
Bram Moolenaar
6ed545e797 patch 8.2.4928: various white space and cosmetic mistakes
Problem:    Various white space and cosmetic mistakes.
Solution:   Change spaces to tabs, improve comments.
2022-05-09 20:09:23 +01:00
LemonBoy
f3b4895f27 patch 8.2.4870: Vim9: expression in :substitute is not compiled
Problem:    Vim9: expression in :substitute is not compiled.
Solution:   Use an INSTR instruction if possible. (closes #10334)
2022-05-05 13:53:03 +01:00
Bram Moolenaar
f6ced9863f patch 8.2.4836: Vim9: some lines not covered by tests
Problem:    Vim9: some lines not covered by tests.
Solution:   Remove dead code.  Add disassemble tests.
2022-04-28 12:00:49 +01:00
Bram Moolenaar
95e4dd813a patch 8.2.4835: Vim9: some lines not covered by tests
Problem:    Vim9: some lines not covered by tests.
Solution:   Add a few more tests.  Fix disassemble output.
2022-04-27 22:15:40 +01:00
Bram Moolenaar
06651630ee patch 8.2.4834: Vim9: some lines not covered by tests
Problem:    Vim9: some lines not covered by tests.
Solution:   Add a few more tests.  Remove dead code.
2022-04-27 17:54:25 +01:00
LemonBoy
372bcceeee patch 8.2.4823: concat more than 2 strings in :def function is inefficient
Problem:    Concatenating more than 2 strings in a :def function is
            inefficient.
Solution:   Add a count to the CONCAT instruction. (closes #10276)
2022-04-25 12:43:20 +01:00
LemonBoy
7714231bb5 patch 8.2.4754: using cached values after unsetting some environment variables
Problem:    Still using cached values after unsetting some known environment
            variables.
Solution:   Take care of the side effects. (closes #10194)
2022-04-15 20:50:46 +01:00
Bram Moolenaar
8944551534 patch 8.2.4748: cannot use an imported function in a mapping
Problem:    Cannot use an imported function in a mapping.
Solution:   Recognize <SID>name.Func.
2022-04-14 12:58:23 +01:00
Bram Moolenaar
aa7d0c2335 patch 8.2.4698: Vim9: script variable has no flag that it was set
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)
2022-04-05 21:40:38 +01:00
Bram Moolenaar
0d1f55c044 patch 8.2.4697: Vim9: crash when adding a duplicate key to a dictionary
Problem:    Vim9: crash when adding a duplicate key to a dictionary.
Solution:   Clear the stack item when it has been moved into the dictionary.
            (closes #10087)
2022-04-05 17:30:29 +01:00
Bram Moolenaar
242c152c08 patch 8.2.4680: build failure without +postscript
Problem:    Build failure without +postscript.
Solution:   Use another error message.
2022-04-03 21:52:51 +01:00
Bram Moolenaar
1061195057 patch 8.2.4678: Vim9: not all code is tested
Problem:    Vim9: not all code is tested.
Solution:   Add a few more tests.
2022-04-03 21:11:34 +01:00
Bram Moolenaar
22ebd172e4 patch 8.2.4662: no error for using out of range list index
Problem:    No error for using out of range list index.
Solution:   Check list index at script level like in compiled function.
            (closes #10051)
2022-04-01 15:26:58 +01:00
Bram Moolenaar
a6c18d38ca patch 8.2.4657: errors for functions are sometimes hard to read
Problem:    Errors for functions are sometimes hard to read.
Solution:   Use printable_func_name() in more places.
2022-03-31 20:02:56 +01:00
Bram Moolenaar
d1d2684c80 patch 8.2.4652: leaking memory if assignment fails
Problem:    Leaking memory if assignment fails.
Solution:   Clear assigned value on failure.
2022-03-31 10:13:47 +01:00
Bram Moolenaar
c0ceeeb839 patch 8.2.4650: "import autoload" only works with using 'runtimepath'
Problem:    "import autoload" only works with using 'runtimepath'.
Solution:   Also support a relative and absolute file name.
2022-03-30 21:12:27 +01:00
Bram Moolenaar
24565cf27b patch 8.2.4643: Vim9: variable may be locked unintentionally
Problem:    Vim9: variable may be locked unintentionally.
Solution:   Clear "v_lock". (closes #10036)
2022-03-28 18:16:52 +01:00
Bram Moolenaar
859cc21c6b patch 8.2.4642: Vim9: in :def function script var cannot be null
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)
2022-03-28 15:22:35 +01:00
Bram Moolenaar
ec15b1cfdc patch 8.2.4634: Vim9: cannot initialize a variable to null_list
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.
2022-03-27 16:29:53 +01:00
Bram Moolenaar
397a87ac1c patch 8.2.4602: Vim9: not enough test coverage for executing :def function
Problem:    Vim9: not enough test coverage for executing :def function.
Solution:   Add a few more tests.  Fix uncovered problem.  Remove dead code.
2022-03-20 21:14:15 +00:00
Bram Moolenaar
6b8c7ba062 patch 8.2.4600: Vim9: not enough test coverage for executing :def function
Problem:    Vim9: not enough test coverage for executing :def function.
Solution:   Add a few more tests.  Fix inconsistencies.
2022-03-20 17:46:06 +00:00
Bram Moolenaar
2995e5cf4e patch 8.2.4590: Vim9: range type check has wrong offset
Problem:    Vim9: range type check has wrong offset.
Solution:   Adjust offset for CHECKTYPE.  Remove other type check.
2022-03-18 21:41:47 +00:00
Bram Moolenaar
61efa16932 patch 8.2.4587: Vim9: double free after unpacking a list
Problem:    Vim9: double free after unpacking a list.
Solution:   Make a copy of the value instead of moving it. (closes #9968)
2022-03-18 13:10:48 +00:00
Bram Moolenaar
139575de66 patch 8.2.4575: Vim9: test for profiling still fails
Problem:    Vim9: test for profiling still fails.
Solution:   Update flags for profiling and breakpoints when obtaining the
            compile type.  Do not set the FC_CLOSURE flag for a toplevel
            function.
2022-03-15 19:29:30 +00:00
Bram Moolenaar
96923b7a14 patch 8.2.4573: a nested function is compiled for debugging without context
Problem:    A nested function (closure) is compiled for debugging without
            context.
Solution:   Check if a nested function is marked for debugging before
            compiling it.  Give an error when trying to compile a closure
            without its context. (closes #9951)
2022-03-15 15:57:04 +00:00
Bram Moolenaar
e406ff87c8 patch 8.2.4541: Crash in debugger when a variable is not available
Problem:    Crash in debugger when a variable is not available in the current
            block.
Solution:   Check for a NULL name. (closes #9926)
2022-03-10 20:47:43 +00:00
Bram Moolenaar
f8691004b0 patch 8.2.4534: Vim9: "is" operator with empty string and null returns true
Problem:    Vim9: "is" operator with empty string and null returns true.
Solution:   Consider empty string and null to be different for "is".
2022-03-10 12:20:53 +00:00