1
0
forked from aniani/vim

131 Commits

Author SHA1 Message Date
Ernie Rael
21d3212361
patch 9.0.1842: Need more accurate profiling
Problem:  Need more accurate profiling
Solution: Improve profiling results

closes: #12192

Reduce overhead of checking if a function should be profiled,
by caching results of checking (which are done with regexp).

Cache uf_hash for uf_name in ufunc_T.

Cache cleared when regexps are changed.

Break at first match for has_profiling lookup.

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-09-02 15:09:18 +02:00
LemonBoy
0ffc17aa47
patch 9.0.1758: vim9 no class identifiers in stack dumps
Problem:  vim9 no class identifiers in stack dumps
Solution: Prefix class members in stack traces with the class name
          followed by a dot.

closes: #12866
closes: #12078

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-20 18:09:11 +02:00
zeertzjq
be5cdd1d63
patch 9.0.1734: :runtime completion fails for multiple args
Problem: :runtime completion fails for multiple args
Solution: Make it work

closes: #12616

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 23:48:58 +02:00
zeertzjq
008c91537b
patch 9.0.1730: passing multiple patterns to runtime not working
Problem: passing multiple patterns to runtime not working
Solution: prepend prefix to each argument separately

closes: #12617

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 23:08:53 +02:00
zeertzjq
276410e78f patch 9.0.1523: some error messages are not marked for translation
Problem:    Some error messages are not marked for translation.
Solution:   Surround the messages in _(). (closes #12356)
2023-05-07 21:59:33 +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
39c9ec16ea patch 9.0.1434: crash when adding package already in 'runtimepath'
Problem:    Crash when adding package already in 'runtimepath'.
Solution:   Change order for using 'runtimepath' entries. (closes #12215)
2023-04-01 13:52:03 +01:00
zeertzjq
2d68b722e3 patch 9.0.1431: getscriptinfo() loops even when specific SID is given
Problem:    getscriptinfo() loops even when specific SID is given.
Solution:   Only loop when needed.  Give a clearer error message.
            (closes #12207)
2023-03-30 21:50:37 +01: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
Yegappan Lakshmanan
fadc02a2a5 patch 9.0.1251: checking returned value of ga_grow() is inconsistent
Problem:    Checking returned value of ga_grow() is inconsistent.
Solution:   Check for FAIL instaed of "not OK". (Yegappan Lakshmanan,
            closes #11897)
2023-01-27 21:03:12 +00:00
zeertzjq
5c8771bc5a patch 9.0.1238: :runtime completion can be further improved
Problem:    :runtime completion can be further improved.
Solution:   Also complete the {where} argument values and adjust the
            completion for that. (closes #11874)
2023-01-24 12:34:03 +00:00
Yegappan Lakshmanan
6ec6666047 patch 9.0.1237: 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 #11858)
2023-01-23 20:46:21 +00:00
zeertzjq
3770f4c9cd patch 9.0.1231: completion of :runtime does not handle {where} argument
Problem:    Completion of :runtime does not handle {where} argument.
Solution:   Parse the {where} argument. (closes #11863)
2023-01-22 18:38:51 +00:00
root
a6759381a5 patch 9.0.1227: no cmdline completion for :runtime
Problem:    No cmdline completion for :runtime.
Solution:   Add completion for :runtime. (closes #11853, closes #11447)
            Improve the resulting matches.
2023-01-21 21:56:06 +00:00
Bram Moolenaar
a2942c7468 patch 9.0.1131: build failure without the +eval feature
Problem:    Build failure without the +eval feature.
Solution:   Move code inside #ifdef.
2023-01-02 13:41:49 +00:00
Bram Moolenaar
39c82ea656 patch 9.0.1130: unexpected output when autoloading a script
Problem:    Unexpected output when autoloading a script for an interactive
            operation.
Solution:   Reset "KeyTyped" while loading a script and when handling a nested
            function. (closes #11773)
2023-01-02 13:08:01 +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
a4e0b9785e patch 9.0.0634: evaluating "expr" options has more overhead than needed
Problem:    Evaluating "expr" options has more overhead than needed.
Solution:   Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr',
            "expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr',
            'formatexpr', 'indentexpr' and 'charconvert'.
2022-10-01 19:43:52 +01:00
Bram Moolenaar
aeef1f7f6d patch 9.0.0468: exectution stack underflow without the +eval feature
Problem:    Exectution stack underflow without the +eval feature. (Dominique
            Pellé)
Solution:   Add to execution stack without FEAT_EVAL. (closes #11135)
2022-09-15 12:20:18 +01:00
Yegappan Lakshmanan
2f892d8663 patch 9.0.0303: it is not easy to get information about a script
Problem:    It is not easy to get information about a script.
Solution:   Make getscriptinf() return the version.  When selecting a specific
            script return functions and variables. (Yegappan Lakshmanan,
            closes #10991)
2022-08-28 18:52:10 +01:00
Yegappan Lakshmanan
520f6ef60a patch 9.0.0269: getscriptinfo() does not include the version
Problem:    getscriptinfo() does not include the version.  Cannot select
            entries by script name.
Solution:   Add the "version" item and the "name" argument. (Yegappan
            Lakshmanan, closes #10962)
2022-08-25 17:40:40 +01:00
Bram Moolenaar
5214b29461 patch 9.0.0256: compiler warning for uninitialized variables
Problem:    Compiler warning for uninitialized variables.
Solution:   Initilize the variables.
2022-08-24 17:32:35 +01:00
Bram Moolenaar
0af2ecfe44 patch 9.0.0255: build failure without the eval feature
Problem:    Build failure without the eval feature.
Solution:   Add #ifdef.
2022-08-24 17:05:56 +01:00
Bram Moolenaar
753885b6c5 patch 9.0.0253: a symlink to an autoload script results in two entries
Problem:    A symlink to an autoload script results in two entries in the list
            of scripts, items expected in one are actually in the other.
Solution:   Have one script item refer to the actually sourced one.
            (closes #10960)
2022-08-24 16:30:36 +01:00
zeertzjq
a247142ae4 patch 9.0.0248: duplicate code in finding a script in the execution stack
Problem:    Duplicate code in finding a script in the execution stack.
Solution:   Reduce duplicate code. (closes #10961)
2022-08-23 19:26:05 +01:00
Yegappan Lakshmanan
f768c3d19c patch 9.0.0244: cannot easily get the list of sourced scripts
Problem:    Cannot easily get the list of sourced scripts.
Solution:   Add the getscriptinfo() function. (Yegappan Lakshmanan,
            closes #10957)
2022-08-22 13:15:13 +01:00
Bram Moolenaar
887748742d patch 9.0.0222: no good reason why text objects are only in larger builds
Problem:    No good reason why text objects are only in larger builds.
Solution:   Graduate +textobjects.
2022-08-16 20:24:29 +01:00
zeertzjq
5a4fff4d94 patch 9.0.0217: 'shellslash' works differently when sourcing a script again
Problem:    'shellslash' works differently when sourcing a script again.
Solution:   Use the name from the script item. (closes #10920)
2022-08-15 17:53:55 +01:00
Yegappan Lakshmanan
ee47eaceaa patch 9.0.0003: functions are global while they could be local
Problem:    Functions are global while they could be local.
Solution:   Add "static".  Add a few tests. (Yegappan Lakshmanan,
            closes #10612)
2022-06-29 12:55:36 +01:00
Bram Moolenaar
4748c4bd64 patch 8.2.4974: ":so" command may read after end of buffer
Problem:    ":so" command may read after end of buffer.
Solution:   Compute length of text properly.
2022-05-17 17:47:07 +01:00
Bram Moolenaar
31e5c60a68 patch 8.2.4753: error from setting an option is silently ignored
Problem:    Error from setting an option is silently ignored.
Solution:   Handle option value errors better.  Fix uses of N_().
2022-04-15 13:53:33 +01:00
LemonBoy
eca7c60d68 patch 8.2.4749: <script> is not expanded in autocmd context
Problem:    <script> is not expanded in autocmd context.
Solution:   Add the context to the pattern struct. (closes #10144)
            Rename AutoPatCmd to AutoPatCmd_T.
2022-04-14 15:39:43 +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
LemonBoy
6013d0045d patch 8.2.4726: cannot use expand() to get the script name
Problem:    Cannot use expand() to get the script name.
Solution:   Support expand('<script>'). (closes #10121)
2022-04-09 21:42:10 +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
2bdad61267 patch 8.2.4647: "source" can read past end of copied line
Problem:    "source" can read past end of copied line.
Solution:   Add a terminating NUL.
2022-03-29 19:52:12 +01:00
Yegappan Lakshmanan
454ce6737c patch 8.2.4617: no completion for :scriptnames
Problem:    No completion for :scriptnames.
Solution:   Implement :scriptnames completion. (Yegappan Lakshmanan,
            closes #10005)
2022-03-24 11:22:13 +00:00
Yegappan Lakshmanan
35dc17634d patch 8.2.4607: sourcing buffer lines may lead to errors for conflicts
Problem:    Sourcing buffer lines may lead to errors for conflicts.
Solution:   Add the ++clear argument. (Yegappan Lakshmanan, closes #9991)
2022-03-22 12:13:54 +00:00
Yegappan Lakshmanan
85b43c6cb7 patch 8.2.4603: sourcing buffer lines is too complicated
Problem:    Sourcing buffer lines is too complicated.
Solution:   Simplify the code. Make it possible to source Vim9 script lines.
            (Yegappan Lakshmanan, closes #9974)
2022-03-21 19:45:17 +00:00
Yegappan Lakshmanan
36a5b6867b patch 8.2.4594: need to write script to a file to be able to source them
Problem:    Need to write script to a file to be able to source them.
Solution:   Make ":source" use lines from the current buffer. (Yegappan
            Lakshmanan et al., closes #9967)
2022-03-19 12:56:51 +00:00
Bram Moolenaar
2a9b62dfa2 patch 8.2.4357: sticky command modifiers are too sticky
Problem:    sticky command modifiers are too sticky.
Solution:   Do not apply command modifiers to a sourced script. (closes #9751)
2022-02-12 13:30:17 +00:00
Bram Moolenaar
769f5895eb patch 8.2.4336: using :filter for :scriptnames does not work
Problem:    Using :filter for :scriptnames does not work. (Ben Jackson)
Solution:   Call message_filtered(). (closes #9720)
2022-02-09 14:31:05 +00:00
=?UTF-8?q?Bj=C3=B6rn=20Linse?=
223a950a85 patch 8.2.4275: cannot use an autoload function from a package under start
Problem:    Cannot use an autoload function from a package under start.
Solution:   Also look in the "start" package directory. (Bjorn Linse,
            closes #7193)
2022-01-31 17:26:05 +00:00
Bram Moolenaar
9c7cae66bc patch 8.2.4162: Vim9: no error for redefining function with export
Problem:    Vim9: no error for redefining function with export.
Solution:   Check for existing function with/without prefix. (closes #9577)
2022-01-20 19:10:25 +00:00
Bram Moolenaar
6079da7cfb patch 8.2.4135: Vim9: ":scriptnames" shows unloaded imported autoload script
Problem:    Vim9: ":scriptnames" shows unloaded imported autoload script.
Solution:   Mark the unloaded script with "A". (closes #9552)
2022-01-18 14:16:59 +00:00
Bram Moolenaar
840f16202e patch 8.2.4133: output of ":scriptnames" goes into the message history
Problem:    output of ":scriptnames" goes into the message history, while this
            des not happen for other commands, such as ":ls".
Solution:   Use msg_outtrans() instead of smsg(). (closes #9551)
2022-01-18 13:34:05 +00:00
Bram Moolenaar
bfac409d0b patch 8.2.4104: Vim9: lower casing the autoload prefix causes problems
Problem:    Vim9: lower casing the autoload prefix causes problems.
Solution:   Always store the prefix with case preserved.
2022-01-16 11:12:12 +00:00
Bram Moolenaar
3049fcf0a1 patch 8.2.4082: check for autoload file name and prefix fails
Problem:    Check for autoload file name and prefix fails. (Christian J.
            Robinson)
Solution:   Only lower case the prefix on systems where the file name is not
            case sensitive.
2022-01-13 19:25:50 +00:00
Bram Moolenaar
5d9826973d patch 8.2.4069: Vim9: import test fails on MS-Windows
Problem:    Vim9: import test fails on MS-Windows.
Solution:   Ignore case.  Adjust test to avoid name that only differs in case.
2022-01-12 15:15:27 +00:00
Bram Moolenaar
f479cac084 patch 8.2.4068: Vim9: import test fails
Problem:    Vim9: import test fails.
Solution:   Add missing change.
2022-01-12 12:54:55 +00:00