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

467 Commits

Author SHA1 Message Date
Yegappan Lakshmanan
7bcd25cad3
patch 9.0.1885: Vim9: no support for abstract methods
Problem:  Vim9: no support for abstract methods
Solution: Add support for defining abstract methods in an abstract class

closes: #13044
closes: #13046

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-08 19:29:31 +02:00
Christian Brabandt
00cb247465
patch 9.0.1876: Vim9: parsing commands with newlines wrong
Problem:  Vim9: parsing commands with newlines wrong
Solution: Accept a '\n' for parsing lists and command arguments

closes: #13015
closes: #13020

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-05 20:53:46 +02:00
Yegappan Lakshmanan
cd7293bf6c
patch 9.0.1804: Vim9: no support for private object methods
Problem:  Vim9: no support for private object methods
Solution: Add support for private object/class methods

closes: #12920

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-27 19:18:23 +02:00
Bram Moolenaar
ce723f3918 patch 9.0.1625: "super" is not considered a reserved name
Problem:    "super" is not considered a reserved name.
Solution:   Add "super" to the list of reserved names. (closes #12515)
2023-06-10 19:00:12 +01:00
Bram Moolenaar
5ca05fa59e patch 9.0.1624: crash when calling object constructor
Problem:    Crash when calling object constructor from legacy script. (Israel
            Chauca Fuentes)
Solution:   Pass a pointer for "ufunc". (closes #12502)
2023-06-10 16:45:13 +01:00
Ernie Rael
114ec813b3 patch 9.0.1605: crash when calling method on super in child constructor
Problem:    Crash when calling method on super in child constructor. (Israel
            Chauca Fuentes)
Solution:   Clear the type list. (Ernie Rael, closes #12489, closes #12471)
2023-06-04 18:11:35 +01:00
Bram Moolenaar
097c5370ea patch 9.0.1576: users may not know what to do with an internal error
Problem:    Users may not know what to do with an internal error.
Solution:   Add a translated message with instructions.
2023-05-24 21:02:24 +01:00
Bram Moolenaar
79cdf026f1 patch 9.0.1571: RedrawingDisabled not used consistently
Problem:    RedrawingDisabled not used consistently.
Solution:   Avoid RedrawingDisabled going negative.  Set RedrawingDisabled in
            win_split_ins(). (closes #11961)
2023-05-20 14:07:00 +01:00
Bram Moolenaar
2ba51236fb patch 9.0.1559: function argument types not always checked
Problem:    Function argument types not always checked and using v:none may
            cause an error.
Solution:   Check argument types once the function type is known.  Do not give
            an error for using v:none as an argument. (closes #12200)
2023-05-15 16:22:38 +01:00
zeertzjq
a93d9cdc74 patch 9.0.1505: error when heredoc content looks like heredoc
Problem:    Error when heredoc content looks like heredoc.
Solution:   Handle curly expressions. (closes #12325)
2023-05-02 16:25:47 +01:00
zeertzjq
1be4b81bfb patch 9.0.1470: deferred functions invoked in unexpected order
Problem:    Deferred functions invoked in unexpected order when using :qa and
            autocommands.
Solution:   Call deferred functions for the current funccal before using the
            stack. (closes #12278)
2023-04-19 14:21:24 +01:00
zeertzjq
960cf9119e patch 9.0.1469: deferred functions not called from autocommands
Problem:    Deferred functions not called from autocommands.
Solution:   Also go through the funccal_stack. (closes #12267)
2023-04-18 21:52:54 +01:00
Bram Moolenaar
42994bf678 patch 9.0.1462: recursively calling :defer function if it does :qa
Problem:    Recursively calling :defer function if it does :qa.
Solution:   Clear the defer entry before calling the function. (closes #12266)
2023-04-17 19:23:45 +01:00
ichizok
7e5fe38efc patch 9.0.1454: code indenting is confused by macros
Problem:    Code indenting is confused by macros.
Solution:   Put semicolon after the macros instead of inside. (Ozaki Kiichi,
            closes #12257)
2023-04-15 13:17:50 +01:00
zeertzjq
5299c0933f patch 9.0.1446: unnecessary checks for the "skip" flag when skipping
Problem:    Unnecessary checks for the "skip" flag when skipping.
Solution:   Remove the unnecessary checks. (closes #12254)
2023-04-12 20:48:16 +01:00
Yegappan Lakshmanan
960dcbd098 patch 9.0.1391: "clear" macros are not always used
Problem:    "clear" macros are not always used.
Solution:   Use ALLOC_ONE, VIM_CLEAR, CLEAR_POINTER and CLEAR_FIELD in more
            places. (Yegappan Lakshmanan, closes #12104)
2023-03-07 17:45:11 +00:00
Yegappan Lakshmanan
14113fdf9c patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected file
Problem:    FOR_ALL_ macros are defined in an unexpected file.
Solution:   Move FOR_ALL_ macros to macros.h.  Add FOR_ALL_HASHTAB_ITEMS.
            (Yegappan Lakshmanan, closes #12109)
2023-03-07 17:13:51 +00:00
Bram Moolenaar
99a7c0d89c patch 9.0.1338: :defcompile and :disassemble can't find class method
Problem:    :defcompile and :disassemble can't find class method. (Ernie Rael)
Solution:   Make a class name and class.method name work. (closes #11984)
2023-02-21 19:55:14 +00:00
Yegappan Lakshmanan
a23a11b5bf patch 9.0.1336: functions without arguments are not always declared properly
Problem:    Functions without arguments are not always declared properly.
Solution:   Use "(void)" instead of "()". (Yegappan Lakshmanan, closes #12031)
2023-02-21 14:27:41 +00:00
Bram Moolenaar
d114975b9b patch 9.0.1321: vimscript test fails where using {expr} syntax
Problem:    vimscript test fails where using {expr} syntax.
Solution:   Only return FCERR_FAILED in call_user_func() for Vim9 script.
2023-02-18 15:31:53 +00:00
Bram Moolenaar
0917e86763 patch 9.0.1320: checking the type of a null object causes a crash
Problem:    Checking the type of a null object causes a crash.
Solution:   Don't try to get the class of a null object. (closes #12005)
            Handle error from calling a user function better.
2023-02-18 14:42:44 +00:00
Yegappan Lakshmanan
142ed77898 patch 9.0.1246: code is indented more than necessary
Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11887)
2023-01-26 12:00:00 +00:00
Bram Moolenaar
b582010350 patch 9.0.1241: Coverity warns for not checking function return value
Problem:    Coverity warns for not checking function return value.
Solution:   Explicitly ignore the return value.
2023-01-25 12:27:13 +00:00
Bram Moolenaar
c8ab30a349 patch 9.0.1161: Coverity warns for using strcpy()
Problem:    Coverity warns for using strcpy().
Solution:   Call a function to set the function name.
2023-01-09 11:35:47 +00:00
Bram Moolenaar
e01e5215f9 patch 9.0.1160: ASAN error for ufunc_T allocated with wrong size
Problem:    ASAN error for ufunc_T allocated with wrong size.
Solution:   Make sure the size can always fit the struct.
2023-01-08 20:31:18 +00:00
Bram Moolenaar
8367716a6e patch 9.0.1159: extends argument for class not implemented yet
Problem:    Extends argument for class not implemented yet.
Solution:   Basic implementation of "extends".
2023-01-08 19:54:10 +00:00
Bram Moolenaar
554d031302 patch 9.0.1150: :interface is not implemented yet
Problem:    :interface is not implemented yet.
Solution:   Implement the basics of :interface.
2023-01-05 19:59:18 +00:00
Bram Moolenaar
f057171d8b patch 9.0.1142: crash and/or memory leak when redefining function
Problem:    Crash and/or memory leak when redefining function after error.
Solution:   Clear pointer after making a copy.  Clear arrays on failure.
            (closes #11774)
2023-01-04 13:16:20 +00:00
Bram Moolenaar
a9fa8c58fb patch 9.0.1133: error message names do not match the items
Problem:    Error message names do not match the items.
Solution:   Add "_str" when the text contains "%s".
2023-01-02 18:10:04 +00:00
Bram Moolenaar
65b0d16768 patch 9.0.1053: default constructor arguments are not optional
Problem:    Default constructor arguments are not optional.
Solution:   Use "= v:none" to make constructor arguments optional.
2022-12-13 18:43:22 +00:00
Bram Moolenaar
7ce7daf6cd patch 9.0.1045: in a class object members cannot be initialized
Problem:    In a class object members cannot be initialized.
Solution:   Support initializing object members. Make "dissassemble" work on
            an object method.
2022-12-10 18:42:12 +00:00
Bram Moolenaar
ffdaca9e6f patch 9.0.1041: cannot define a method in a class
Problem:    Cannot define a method in a class.
Solution:   Implement defining an object method.  Make calling an object
            method work.
2022-12-09 21:41:48 +00:00
Bram Moolenaar
00b28d6c23 patch 9.0.1031: Vim9 class is not implemented yet
Problem:    Vim9 class is not implemented yet.
Solution:   Add very basic class support.
2022-12-08 15:32:33 +00:00
Bram Moolenaar
ef2c325f5e patch 9.0.0949: crash when unletting a variable while listing variables
Problem:    Crash when unletting a variable while listing variables.
Solution:   Disallow changing a hashtable while going over the entries.
            (closes #11435)
2022-11-25 16:31:51 +00:00
Bram Moolenaar
398a26f7fc patch 9.0.0875: using freed memory when executing delfunc at more prompt
Problem:    Using freed memory when executing delfunc at the more prompt.
Solution:   Check function list not changed in another place. (closes #11437)
2022-11-13 22:13:33 +00:00
dundargoc
c57b5bcd22 patch 9.0.0828: various typos
Problem:    Various typos.
Solution:   Correct typos. (closes #11432)
2022-11-02 13:30:51 +00:00
Bram Moolenaar
87b4e5c5db patch 9.0.0632: calling a function from an "expr" option has overhead
Problem:    Calling a function from an "expr" option has too much overhead.
Solution:   Add call_simple_func() and use it for 'foldexpr'
2022-10-01 15:32:46 +01:00
Bram Moolenaar
cfb4d4f312 patch 9.0.0630: in Vim9 script a numbered function cannot be called
Problem:    In Vim9 script a numbered function cannot be called.
Solution:   Do not require "g:" before a numbered function name.
            (closes #11254)
2022-09-30 19:19:04 +01:00
Yegappan Lakshmanan
e9dcf13a30 patch 9.0.0568: autocmd code is indented more than needed
Problem:    Autocmd code is indented more than needed.
Solution:   Break out sooner. (Yegappan Lakshmanan, closes #11208)
            Also in user function code.
2022-09-24 11:30:41 +01:00
Bram Moolenaar
f5f4e85f01 patch 9.0.0553: no error for "|" after "{" in lamda
Problem:    No error for "|" after "{" in lamda.
Solution:   Check for invalid "|". (closes #11199)
2022-09-22 22:03:14 +01:00
Bram Moolenaar
cc34181f99 patch 9.0.0502: a closure in a nested loop in a :def function does not work
Problem:    A closure in a nested loop in a :def function does not work.
Solution:   Use an array of loopvars, one per loop level.
2022-09-19 15:54:34 +01:00
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
zeertzjq
48db5dafec patch 9.0.0476: varargs does not work for replacement function of substitute()
Problem:    Varargs does not work for replacement function of substitute().
Solution:   Check the varargs flag of the function. (closes #11142)
2022-09-16 12:10:03 +01:00
Bram Moolenaar
169003289f patch 9.0.0419: the :defer command does not check the function arguments
Problem:    The :defer command does not check the function argument count and
            types.
Solution:   Check the function arguments when adding a deferred function.
2022-09-08 19:51:45 +01:00
Bram Moolenaar
6f14da15ac patch 9.0.0411: only created files can be cleaned up with one call
Problem:    Only created files can be cleaned up with one call.
Solution:   Add flags to mkdir() to delete with a deferred function.
            Expand the writefile() name to a full path to handle changing
            directory.
2022-09-07 21:30:44 +01:00
Bram Moolenaar
9667b2c888 patch 9.0.0406: deferred functions not invoked when partial func exits
Problem:    Deferred functions not invoked when partial func exits.
Solution:   Create a funccall_T when calling a :def function.
2022-09-07 17:28:09 +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