Commit Graph

25663 Commits

Author SHA1 Message Date
zeertzjq
7b05ddbb72 vim-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.

58779858fb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 15:04:41 +08:00
zeertzjq
335bef0c21 vim-patch:9.0.0390: cannot use a partial with :defer
Problem:    Cannot use a partial with :defer.
Solution:   Add the partial arguments before the other arguments.  Disallow
            using a dictionary.

86d87256c4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 15:04:41 +08:00
zeertzjq
0167649ce4 vim-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.

806a273f3c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 15:04:41 +08:00
zeertzjq
b75634e55e vim-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.

1d84f7608f

Omit EX_EXPR_ARG: Vim9 script only.
Make :def throw E319 to avoid confusing behavior.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 15:04:40 +08:00
zeertzjq
54dab9ed9e
Merge pull request #23118 from zeertzjq/vim-8.2.3783
vim-patch:8.2.{1945,2848,2977,2978,3783,3786}
2023-04-16 10:42:11 +08:00
zeertzjq
d7965293ec vim-patch:8.2.3786: test fails because of using Vim9 syntax in legacy function
Problem:    Test fails because of using Vim9 syntax in legacy function.
Solution:   Add "call".

4f16e9de98

Add test_nested_function.vim changes from patches 8.{0.0141,2.1432}.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 10:18:39 +08:00
zeertzjq
68ca16c376 vim-patch:8.2.3783: confusing error for using a variable as a function
Problem:    Confusing error for using a variable as a function.
Solution:   If a function is not found but there is a variable, give a more
            useful error. (issue vim/vim#9310)

2ef9156b42

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 10:15:15 +08:00
zeertzjq
2e8cec5f2b vim-patch:8.2.2978: warning for uninitialized variable
Problem:    Warning for uninitialized variable.
Solution:   Set return value to FAIL.

744aecf877

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 10:15:15 +08:00
zeertzjq
f4d3e279e8 vim-patch:8.2.2977: crash when using a null function reference
Problem:    Crash when using a null function reference. (Naohiro Ono)
Solution:   Check for an invalid function name. (closes vim/vim#8367)

22db0d549f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 10:15:15 +08:00
zeertzjq
08121ef69f vim-patch:8.2.2848: crash whn calling partial
Problem:    Crash whn calling partial.
Solution:   Check for NULL pointer. (Dominique Pellé, closes vim/vim#8202)

fe8ebdbe5c

Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
2023-04-16 10:15:15 +08:00
zeertzjq
d13222649a vim-patch:8.2.1945: crash when passing NULL function to reduce()
Problem:    Crash when passing NULL function to reduce().
Solution:   Check for NULL pointer and give an error. (Dominique Pellé,
            closes vim/vim#7243)

0d90e728fe

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 10:15:13 +08:00
zeertzjq
6adfd24a06
vim-patch:8.2.4716: memory allocation failure not tested when defining a function (#23117)
Problem:    Memory allocation failure not tested when defining a function.
Solution:   Add a test. (Yegappan Lakshmanan, closes vim/vim#10127)

7c7e19cf50

test_alloc_fail() is N/A.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-16 08:26:42 +08:00
dundargoc
c08b030761
refactor: deprecate checkhealth functions
The following functions are deprecated and will be removed in
Nvim v0.11:

- health#report_start()
- health#report_info()
- health#report_ok()
- health#report_warn()
- health#report_error()
- vim.health.report_start()
- vim.health.report_info()
- vim.health.report_ok()
- vim.health.report_warn()
- vim.health.report_error()

Users should instead use these:

- vim.health.start()
- vim.health.info()
- vim.health.ok()
- vim.health.warn()
- vim.health.error()
2023-04-15 23:40:48 +02:00
dundargoc
c8667c8756
build: various cmake fixes
- Remove unused function argument from GetBinaryDeps
- Remove unused variable LUA_LOAD_PACKAGE_MODULE_SOURCE
- Add LUA_FS_MODULE_SOURCE as a dependency of VIM_MODULE_FILE
2023-04-15 22:39:30 +02:00
zeertzjq
8c6f97bef8
fix(health): properly use the value of $PYENV_VERSION (#23109) 2023-04-16 00:16:50 +08:00
zeertzjq
2e2101cf7b
Merge pull request #23107 from zeertzjq/vim-9.0.0269
vim-patch:9.0.{0269,0303,1431}: more getscriptinfo() features
2023-04-15 21:27:30 +08:00
zeertzjq
9770dcf96d refactor: remove FC_DEAD
It's for Vim9 script only.
2023-04-15 21:06:17 +08:00
zeertzjq
c5ec823a14 vim-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 vim/vim#12207)

2d68b722e3
2023-04-15 21:06:17 +08:00
zeertzjq
e9b4f51051 vim-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 vim/vim#10991)

2f892d8663

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-15 21:06:17 +08:00
zeertzjq
bcc971de15 vim-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 vim/vim#10962)

520f6ef60a

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-15 21:06:16 +08:00
Will Ruggiano
eb151a9730
build(nix): upgrade nixpkgs to resolve link error (#23101)
bump nixpkgs to get the appropriate treesitter version
2023-04-15 14:54:16 +02:00
zeertzjq
62b7b1daf3
Merge pull request #23105 from zeertzjq/vim-8.2.4770
vim-patch:8.2.{4770,4783,4840,4883,4930,4934},9.0.0104: interpolated string
2023-04-15 19:46:17 +08:00
zeertzjq
57221e0d11 vim-patch:b59ae59a5870
Update runtime files

b59ae59a58

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 19:13:58 +08:00
zeertzjq
9f1d333072 vim-patch:3f32a5f1601a
Update runtime files and translations

3f32a5f160

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 19:05:58 +08:00
zeertzjq
f2a9097d76 vim-patch:partial:d899e5112079
Update runtime files

d899e51120

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 19:02:52 +08:00
zeertzjq
c6ebcd523d vim-patch:9.0.0104: going beyond allocated memory when evaluating string constant
Problem:    Going beyond allocated memory when evaluating string constant.
Solution:   Properly skip over <Key> form.

1e56bda904

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 19:01:24 +08:00
zeertzjq
29efd54e02 vim-patch:8.2.4934: string interpolation fails when not evaluating
Problem:    String interpolation fails when not evaluating.
Solution:   Skip the expression when not evaluating. (closes vim/vim#10398)

70c41241c2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 19:01:19 +08:00
zeertzjq
ef9af89da7 vim-patch:8.2.4930: interpolated string expression requires escaping
Problem:    Interpolated string expression requires escaping.
Solution:   Do not require escaping in the expression.

0abc2871c1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 18:19:17 +08:00
zeertzjq
bacb5021d4 vim-patch:8.2.4883: string interpolation only works in heredoc
Problem:    String interpolation only works in heredoc.
Solution:   Support interpolated strings.  Use syntax for heredoc consistent
            with strings, similar to C#. (closes vim/vim#10327)

2eaef106e4

Cherry-pick Test_Debugger_breakadd_expr() from Vim.

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-04-15 17:59:32 +08:00
zeertzjq
2cf8f01e7d vim-patch:8.2.4840: heredoc expression evaluated even when skipping
Problem:    Heredoc expression evaluated even when skipping.
Solution:   Don't evaluate when "skip" is set. (closes vim/vim#10306)

05c7f5d3d0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 17:40:31 +08:00
zeertzjq
3c16e75ae1 vim-patch:8.2.4783: Coverity warns for leaking memory
Problem:    Coverity warns for leaking memory.
Solution:   Use another strategy freeing "theline".

42ccb8d747

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 17:40:31 +08:00
zeertzjq
3ad8c08acc vim-patch:8.2.4770: cannot easily mix expression and heredoc
Problem:    Cannot easily mix expression and heredoc.
Solution:   Support  in heredoc. (Yegappan Lakshmanan, closes vim/vim#10138)

efbfa867a1

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-15 17:40:31 +08:00
zeertzjq
071c455420
Merge pull request #23102 from zeertzjq/vim-8.2.1378
vim-patch:8.2.{1378,3856,4361,4373,4476}
2023-04-15 17:38:46 +08:00
zeertzjq
1b556c04bf vim-patch:8.2.4476: operator name spelled wrong
Problem:    Operator name spelled wrong.
Solution:   Change trinary to ternary. (Goc Dundar, closes vim/vim#9850)

e41c1dd889

Co-authored-by: =?UTF-8?q?Dundar=20G=C3=B6c?= <gocdundar@gmail.com>
2023-04-15 17:15:04 +08:00
zeertzjq
408e5d16a9 vim-patch:8.2.4373: expression test fails
Problem:    Expression test fails.
Solution:   Make the test work with latest Vim9 syntax.

c87aa34dfd

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 17:14:49 +08:00
zeertzjq
b29df57ba7 vim-patch:8.2.4361: Vim9: some tests fail
Problem:    Vim9: some tests fail.
Solution:   Fix the tests, mostly by removing "s:".

62b191c387

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 17:14:30 +08:00
zeertzjq
f04125a935 vim-patch:8.2.3856: Vim9: not enough tests
Problem:    Vim9: not enough tests.
Solution:   Run more expression tests also with Vim9. Fix an uncovered
            problem.

fea43e44c0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 17:09:42 +08:00
zeertzjq
700152fbf8 vim-patch:8.2.1378: cannot put space between function name and paren
Problem:    Cannot put space between function name and paren.
Solution:   Allow this for backwards compatibility.

bbd3e3c357

This fixes a regression from patch 8.2.1365, which isn't ported yet.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 17:09:41 +08:00
zeertzjq
0a61cb60a6
Merge pull request #23099 from zeertzjq/vim-8.2.1014
vim-patch:8.2.{1014,3329}
2023-04-15 14:57:14 +08:00
zeertzjq
9636ae6a13 vim-patch:8.2.3329: v_lock not set when getting value of environment variable
Problem:    v_lock not set when getting value of environment variable.
Solution:   Set v_lock to zero.

16e63e6d35

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 14:28:40 +08:00
zeertzjq
031cf60d4a vim-patch:8.2.1014: using "name" for a string result is confusing
Problem:    Using "name" for a string result is confusing.
Solution:   Rename to "end".

1e0b7b11db

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 14:21:07 +08:00
zeertzjq
1ca77c222b
Merge pull request #23097 from zeertzjq/vim-8.2.0101
vim-patch:8.2.{0101,0102,0103,0104,0633,0634}: null typval tests
2023-04-15 14:11:10 +08:00
zeertzjq
85741677c8 vim-patch:8.2.0634: crash with null partial and blob
Problem:    Crash with null partial and blob.
Solution:   Check for NULL pointer.  Add more tests. (Yegappan Lakshmanan,
            closes vim/vim#5984)

92b83ccfda

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 13:48:30 +08:00
zeertzjq
4b49f312a0 vim-patch:8.2.0633: crash when using null partial in filter()
Problem:    Crash when using null partial in filter().
Solution:   Fix crash.  Add more tests. (Yegappan Lakshmanan, closes vim/vim#5976)

9d8d0b5c64

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 13:31:10 +08:00
zeertzjq
3d80392cab vim-patch:8.2.0104: using channel or job with ":execute" has strange effects
Problem:    Using channel or job with ":execute" has strange effects.
Solution:   Give an error message for Job and Channel.

b662591e50

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 13:17:20 +08:00
zeertzjq
4c276bbd18 vim-patch:8.2.0103: using null object with execute() has strange effects
Problem:    Using null object with execute() has strange effects.
Solution:   Give an error message ofr Job and Channel.

e2a8f0773e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 13:15:10 +08:00
zeertzjq
d372eedcfa vim-patch:8.2.0102: messages test fails in small version
Problem:    Messages test fails in small version.
Solution:   Only use test_null_job() when available.

da292b07af

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 13:10:27 +08:00
zeertzjq
0eddf5ad2f vim-patch:8.2.0101: crash when passing null object to ":echomsg"
Problem:    Crash when passing null object to ":echomsg".
Solution:   Check for NULL pointer. (Yasuhiro Matsumoto, closes vim/vim#5460)

9db2afe46d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 13:09:05 +08:00
dundargoc
c2e47e7bec
build: don't print installed files locally
It takes a significant amount of time to install neovim, and doubly so
on Windows, due to the sheer amount of files neovim ships with. On CI
this information may be important though, so we enable it if the
CI_ENABLE option is set to ON.
2023-04-14 19:19:49 +02:00
zeertzjq
ae9654dd73
vim-patch:8.2.4055: Vim9: line break in expression causes v:errmsg to be fillec (#23090)
Problem:    Vim9: line break in expression causes v:errmsg to be filled.
            (Yegappan Lakshmanan)
Solution:   Do not give an error when skipping over an expression.

5e6b9882fe

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-14 21:56:13 +08:00