1
0
forked from aniani/vim

492 Commits

Author SHA1 Message Date
Bram Moolenaar
fc0e8f5c3e patch 8.2.2218: Vim9: failure if passing more args to lambda than expected
Problem:    Vim9: failure if passing more arguments to a lambda than expected.
Solution:   Only put expected arguments on the stack. (closes #7548)
2020-12-25 20:24:51 +01:00
Bram Moolenaar
20a762987e patch 8.2.2217: Vim9: command modifiers not restored in catch block
Problem:    Vim9: command modifiers not restored in catch block.
Solution:   Restore command modifiers. (closes #7542)
2020-12-25 19:47:24 +01:00
Bram Moolenaar
4aab88d919 patch 8.2.2208: Vim9: after reloading a script variable index may be invalid
Problem:    Vim9: after reloading a script variable index may be invalid.
Solution:   When the sequence number doesn't match give an error for using a
            script-local variable from a compiled function. (closes #7547)
2020-12-24 21:56:41 +01:00
Bram Moolenaar
3bdc90b7df patch 8.2.2193: Vim9: can change constant in :def function
Problem:    Vim9: can change constant in :def function.
Solution:   Check if a variable is locked. (issue #7526)
2020-12-22 20:35:40 +01:00
Bram Moolenaar
cd45ed03bf patch 8.2.2188: Vim9: crash when calling global function from :def function
Problem:    Vim9: crash when calling global function from :def function.
Solution:   Set the outer context.  Define the partial for the context on the
            original function. Use a refcount to keep track of which ufunc is
            using a dfunc. (closes #7525)
2020-12-22 17:35:54 +01:00
Bram Moolenaar
4f5e397756 patch 8.2.2179: Vim9: crash when indexing a dict with a number
Problem:    Vim9: crash when indexing a dict with a number.
Solution:   Add ISN_STOREINDEX. (closes #7513)
2020-12-21 17:30:50 +01:00
Bram Moolenaar
52c124d330 patch 8.2.2173: Vim9: get internal error when assigning to undefined variable
Problem:    Vim9: get internal error when assigning to undefined variable.
Solution:   Add error message. (closes #7475)
2020-12-20 21:43:35 +01:00
Bram Moolenaar
5082471f91 patch 8.2.2172: Vim9: number of arguments is not always checked
Problem:    Vim9: number of arguments is not always checked. (Yegappan
            Lakshmanan)
Solution:   Check number of arguments when calling function by name.
2020-12-20 21:10:17 +01:00
Bram Moolenaar
f112f30a82 patch 8.2.2170: Vim9: a global function defined in a :def function fails
Problem:    Vim9: a global function defined in a :def function fails if it
            uses the context.
Solution:   Create a partial to store the closure context. (see #7410)
2020-12-20 17:47:52 +01:00
Bram Moolenaar
03290b8444 patch 8.2.2162: Vim9: Cannot load or store autoload variables
Problem:    Vim9: Cannot load or store autoload variables.
Solution:   Add ISN_LOADAUTO and ISN_STOREAUTO. (closes #7485)
2020-12-19 16:30:44 +01:00
Bram Moolenaar
8e7d6223f6 patch 8.2.2160: various typos
Problem:    Various typos.
Solution:   Fix spelling mistakes. (closes #7494)
2020-12-18 19:49:56 +01:00
Bram Moolenaar
3beaf9cd8e patch 8.2.2159: Vim9: when declaring a list it is not allocated yet
Problem:    Vim9: when declaring a list it is not allocated yet, causing a
            following extend() to fail.
Solution:   When fetching a variable value for a list or dict that is null
            allocate the list or dict, so it can be used. (closes #7491)
2020-12-18 17:23:14 +01:00
Bram Moolenaar
57f799e6a4 patch 8.2.2134: Vim9: get E1099 when autocmd triggered in builtin function
Problem:    Vim9: get E1099 when autocmd triggered in builtin function.
Solution:   Check that did_emsg increased instead of checking that it changed.
            (closes #7448)
2020-12-12 20:42:19 +01:00
Bram Moolenaar
08597875b2 patch 8.2.2124: Vim9: a range cannot be computed at runtime
Problem:    Vim9: a range cannot be computed at runtime.
Solution:   Add the ISN_RANGE instruction.
2020-12-10 19:43:40 +01:00
Bram Moolenaar
56602ba153 patch 8.2.2097: Vim9: using :silent! when calling a function prevents abort
Problem:    Vim9: using :silent! when calling a function prevents abortng that
            function.
Solution:   Add emsg_silent_def and did_emsg_def.
2020-12-05 21:22:08 +01:00
Bram Moolenaar
f665e97ffa patch 8.2.2096: Vim9: command modifiers not restored after assignment
Problem:    Vim9: command modifiers not restored after assignment.
Solution:   Jump to nextline instead of using continue.
2020-12-05 19:17:16 +01:00
Bram Moolenaar
4029cabbe7 patch 8.2.2095: Vim9: crash when failed dict member is followed by concat
Problem:    Vim9: crash when failed dict member is followed by concatenation.
Solution:   Remove the dict from the stack. (closes #7416)
2020-12-05 18:13:27 +01:00
Bram Moolenaar
af0df47a76 patch 8.2.2083: Vim9: crash when using ":silent!" and getting member fails
Problem:    Vim9: crash when using ":silent!" and getting member fails.
Solution:   Jump to on_fatal_error. (closes #7412)
2020-12-02 20:51:22 +01:00
Bram Moolenaar
34c54eb6cb patch 8.2.2051: Vim9: crash when aborting a user function call
Problem:    Vim9: crash when aborting a user function call.
Solution:   Do not use the return value when aboring. (closes #7372)
2020-11-25 19:15:19 +01:00
Bram Moolenaar
792f786aad patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
Problem:    Vim9: list unpack in for statement not compiled yet.
Solution:   Compile list unpack. (closes #7345)
2020-11-23 08:31:18 +01:00
Bram Moolenaar
6abdcf8285 patch 8.2.2033: Vim9: :def without argument gives compilation error
Problem:    Vim9: :def without argument gives compilation error.
Solution:   Add the DEF instruction. (closes #7344)
2020-11-22 18:15:44 +01:00
Bram Moolenaar
c71ee829ef patch 8.2.2023: Vim: memory leak when :execute fails
Problem:    Vim: memory leak when :execute fails.
Solution:   Clear the growarray.
2020-11-21 11:45:50 +01:00
Bram Moolenaar
eeece9e488 patch 8.2.2021: Vim9: get E1099 when autocommand resets did_emsg
Problem:    Vim9: get E1099 when autocommand resets did_emsg.
Solution:   Add did_emsg_cumul. (closes #7336)
2020-11-20 19:26:48 +01:00
Bram Moolenaar
0ba48e8c27 patch 8.2.2001: Vim9: :def function does not apply 'maxfuncdepth'
Problem:    Vim9: :def function does not apply 'maxfuncdepth'.
Solution:   Use 'maxfuncdepth'. (issue #7313)
2020-11-17 18:23:19 +01:00
Bram Moolenaar
ea2d407f9c patch 8.2.1977: Vim9: error for using a string in a condition is confusing
Problem:    Vim9: error for using a string in a condition is confusing.
Solution:   Give a more specific error.  Also adjust the compile time type
            checking for || and &&.
2020-11-12 12:08:51 +01:00
Bram Moolenaar
631e8f9345 patch 8.2.1953: Vim9: extra "unknown" error after other error
Problem:    Vim9: extra "unknown" error after other error.
Solution:   Restore did_emsg count after EXEC instruction. (closes #7254)
            Improve error message from assert_fails()
2020-11-04 15:07:16 +01:00
Bram Moolenaar
c7f7f6db3e patch 8.2.1952: Vim9: crash when using a NULL dict key
Problem:    Vim9: crash when using a NULL dict key.
Solution:   Use a NULL dict key like an empty string. (closes #7249)
2020-11-04 13:38:28 +01:00
Bram Moolenaar
cd030c4b60 patch 8.2.1928: Vim9: "silent!" not effective when list index is wrong
Problem:    Vim9: "silent!" not effective when list index is wrong.
Solution:   Ignore list indes failure when emsg_silent is set. (closes #7232)
2020-10-30 21:49:40 +01:00
Bram Moolenaar
d66960bf57 patch 8.2.1927: Vim9: get unknown error with an error in a timer function
Problem:    Vim9: get unknown error with an error in a timer function.
Solution:   Use did_emsg instead of called_emsg. (closes #7231)
2020-10-30 20:46:26 +01:00
Bram Moolenaar
086fc9a585 patch 8.2.1924: Vim9: crash when indexing dict with NULL key
Problem:    Vim9: crash when indexing dict with NULL key.
Solution:   Use empty string instead of NULL. (closes #7229)  Make error
            message more useful for empty string.
2020-10-30 18:33:02 +01:00
Bram Moolenaar
28ee892ac4 patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution
Problem:    Assert_fails() setting emsg_silent changes normal execution.
Solution:   Use a separate flag in_assert_fails.
2020-10-28 20:20:00 +01:00
Bram Moolenaar
171fb923b8 patch 8.2.1916: Vim9: function call is aborted even when "silent!" is used
Problem:    Vim9: function call is aborted even when "silent!" is used.
Solution:   Use did_emsg instead of called_emsg. (closes #7213)
2020-10-28 16:54:47 +01:00
Bram Moolenaar
a360dbe3b6 patch 8.2.1906: warning for signed/unsigned
Problem:    Warning for signed/unsigned.
Solution:   Use size_t instead of int. (Mike Williams)
2020-10-26 18:46:53 +01:00
Bram Moolenaar
02194d2bd5 patch 8.2.1900: Vim9: command modifiers do not work
Problem:    Vim9: command modifiers do not work.
Solution:   Make most command modifiers work.
2020-10-24 23:08:38 +02:00
Bram Moolenaar
f4c6e1e75c patch 8.2.1894: Vim9: command modifiers are not supported
Problem:    Vim9: command modifiers are not supported.
Solution:   Support "silent" and "silent!".
2020-10-23 18:02:32 +02:00
Bram Moolenaar
955347cc7e patch 8.2.1869: Vim9: memory leak when using add()
Problem:    Vim9: memory leak when using add().
Solution:   Free the added item.
2020-10-19 23:01:46 +02:00
Bram Moolenaar
80b0e5ea11 patch 8.2.1867: Vim9: argument to add() not checked for blob
Problem:    Vim9: argument to add() not checked for blob.
Solution:   Add the BLOBAPPEND instruction.
2020-10-19 20:45:36 +02:00
Bram Moolenaar
1dcae59957 patch 8.2.1865: Vim9: add() does not check type of argument
Problem:    Vim9: add() does not check type of argument.
Solution:   Inline the add() call. (closes #7160)
2020-10-19 19:02:42 +02:00
Bram Moolenaar
335e671322 patch 8.2.1860: Vim9: memory leak when throwing empty string
Problem:    Vim9: memory leak when throwing empty string.
Solution:   Free the empty string.
2020-10-17 22:58:21 +02:00
Bram Moolenaar
352134bbfb patch 8.2.1859: Vim9: crash in unpack assignment
Problem:    Vim9: crash in unpack assignment.
Solution:   Make sure an error message is turned into an exception.
            (closes #7159)
2020-10-17 22:04:08 +02:00
Bram Moolenaar
e13bdec6b9 patch 8.2.1855: Vim9: get error message when nothing is wrong
Problem:    Vim9: get error message when nothing is wrong.
Solution:   Check called_emsg instead of did_emsg. (closes #7143)
2020-10-16 23:16:47 +02:00
Bram Moolenaar
1e021e63c5 patch 8.2.1854: Vim9: crash when throwing exception for NULL string
Problem:    Vim9: crash when throwing exception for NULL string. (Dhiraj
            Mishra)
Solution:   Handle NULL string like empty string. (closes #7139)
2020-10-16 20:25:23 +02:00
Bram Moolenaar
fbbcd00367 patch 8.2.1846: Vim9: block variables are not found in compiled function
Problem:    Vim9: variables declared in a local block are not found in
            when a function is compiled.
Solution:   Look for script variables in sn_all_vars.
2020-10-15 12:46:44 +02:00
Bram Moolenaar
85d5e2b723 patch 8.2.1819: Vim9: Memory leak when using a closure
Problem:    Vim9: Memory leak when using a closure.
Solution:   Compute the mininal refcount in the funcstack.  Reenable disabled
            tests.
2020-10-10 14:13:01 +02:00
Bram Moolenaar
0876c78527 patch 8.2.1812: Vim9: nested closure throws an internal error
Problem:    Vim9: nested closure throws an internal error.
Solution:   Do not skip a local variable with a partial. (closes #7065)
2020-10-07 19:08:04 +02:00
Bram Moolenaar
1310660557 patch 8.2.1798: Vim9: trinary operator condition is too permissive
Problem:    Vim9: trinary operator condition is too permissive.
Solution:   Use tv_get_bool_chk().
2020-10-04 16:06:05 +02:00
Bram Moolenaar
2bb2658bef patch 8.2.1795: Vim9: operators && and || have a confusing result
Problem:    Vim9: operators && and || have a confusing result.
Solution:   Make the result a boolean.
2020-10-03 22:52:39 +02:00
Bram Moolenaar
5366e1aecf patch 8.2.1778: Vim9: returning from a partial call clears outer context
Problem:    Vim9: returning from a partial call clears outer context, causing
            a crash.
Solution:   Put the outer context in the stack frame. (closes #7044)
2020-10-01 13:01:34 +02:00
Bram Moolenaar
c70bdab0b8 patch 8.2.1749: Vim9: crash when closure fails in nested function
Problem:    Vim9: crash when closure fails in nested function.
Solution:   Handle function returns before dereferencing remaining closures.
            (closes #7008)
2020-09-26 19:59:38 +02:00
Bram Moolenaar
30fd8204ce patch 8.2.1744: Vim9: using ":const!" is weird
Problem:    Vim9: using ":const!" is weird.
Solution:   Use "var" - "final" - "const" like Dart.  "let" still works for
            now.
2020-09-26 15:09:30 +02:00