1
0
forked from aniani/vim

418 Commits

Author SHA1 Message Date
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
Bram Moolenaar
8acb9cc620 patch 8.2.4526: Vim9: cannot set variables to a null value
Problem:    Vim9: cannot set variables to a null value.
Solution:   Add null_list, null_job, etc.
2022-03-08 13:18:55 +00:00
Bram Moolenaar
7a22224875 patch 8.2.4487: Vim9: cannot compare with v:null
Problem:    Vim9: cannot compare with v:null.
Solution:   Allow comparing anything with v:null. (closes #9866)
2022-03-01 19:23:24 +00:00
Bram Moolenaar
1983f1aa31 patch 8.2.4484: Vim9: some error messages are not tested
Problem:    Vim9: some error messages are not tested.
Solution:   Add a few more test cases.  Delete dead code.
2022-02-28 20:55:02 +00:00
Bram Moolenaar
fe73255c92 patch 8.2.4446: Vim9: cannot refer to a global function like a local one
Problem:    Vim9: cannot refer to a global function like a local one.
Solution:   When g:name is not a variable but a function, use a function
            reference. (closes #9826)
2022-02-22 19:39:13 +00:00
Bram Moolenaar
56acd1f8ed patch 8.2.4413: Vim9: Coverity warns for using NULL pointer
Problem:    Vim9: Coverity warns for using NULL pointer.
Solution:   Give an internal error when funcref function can't be found.
2022-02-18 13:24:52 +00:00
Bram Moolenaar
0c7f2610de patch 8.2.4410: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests. Remove dead code.
2022-02-17 19:44:07 +00:00
Bram Moolenaar
6296d1e60e patch 8.2.4409: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests.  Fix reported line number.
2022-02-17 16:30:11 +00:00
Bram Moolenaar
ea5c898b5f patch 8.2.4408: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests.  Correct error message.  Allow unlet on dict
            with a number key.
2022-02-17 14:42:02 +00:00
Bram Moolenaar
e08be09a08 patch 8.2.4407: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add more tests.  Avoid giving two errors.  Remove dead code.
2022-02-17 13:08:26 +00:00
Bram Moolenaar
cd1cda2f87 patch 8.2.4404: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few specific test cases.
2022-02-16 21:48:25 +00:00
Bram Moolenaar
90a57168a4 patch 8.2.4358: Vim9: line number of exception is not set
Problem:    Vim9: line number of exception is not set.
Solution:   Set the line number before throwing an exception. (closes #9755)
2022-02-12 14:23:17 +00:00
Bram Moolenaar
7aca5ca676 patch 8.2.4322: Vim9: crash when using funcref with closure
Problem:    Vim9: crash when using funcref with closure.
Solution:   Keep a reference to the funcref that has the outer context.
            (closes #9716)
2022-02-07 19:56:43 +00:00
Bram Moolenaar
4e713bafc0 patch 8.2.4319: :put does not work properly in compiled function
Problem:    :put does not work properly in compiled function. (John Beckett)
Solution:   Adjust the direction when using line zero.
2022-02-07 15:31:37 +00:00
Bram Moolenaar
fe1bfc9b26 patch 8.2.4309: Vim9: crash when using a partial in the wrong context
Problem:    Vim9: crash when using a partial in the wrong context.
Solution:   Don't use an NULL outer pointer. (closes #9706)
2022-02-06 13:55:03 +00:00
Bram Moolenaar
381692b6f1 patch 8.2.4286: Vim9: strict type checking after copy() and deepcopy()
Problem:    Vim9: strict type checking after copy() and deepcopy().
Solution:   Allow type to change after making a copy. (closes #9644)
2022-02-02 20:01:27 +00:00
Bram Moolenaar
70c43d84be patch 8.2.4225: Vim9: depth argument of :lockvar not parsed in :def function
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.
2022-01-26 21:01:15 +00:00