Famiu Haque
a27419f3fc
feat(options)!: disallow setting hidden options #28400
...
Problem:
There are three different ways of marking an option as hidden, `enable_if
= false`, `hidden = true` and `immutable = true`. These also have different
behaviors. Options hidden with `enable_if = false` can't have their value
fetched using Vim script or the API, but options hidden with `hidden = true` or
`immutable = true` can. On the other hand, options with `hidden = true` do not
error when trying to set their value, but options with `immutable = true` do.
Solution:
Remove `enable_if = false`, remove the `hidden` property for options, and use
`immutable = true` to mark an option as hidden instead. Also make hidden option
variable pointers always point to the default value, which allows fetching the
value of every hidden option using Vim script and the API. This does also mean
that trying to set a hidden option will now give an error instead of just being
ignored.
2024-11-04 05:00:12 -08:00
zeertzjq and h-east
a6d5e6b105
vim-patch:a420547: runtime(misc): Use consistent "Vim script" spelling ( #30805 )
...
References: https://groups.google.com/g/vim_dev/c/3Z5yM8KER2w/m/wAqws0QSEAAJ
closes : vim/vim#15863
https://github.com/vim/vim/commit/a4205471adae39c80fb7f151a4f33051fcb80001
Co-authored-by: h-east <h.east.727@gmail.com >
2024-10-14 09:27:29 +08:00
zeertzjq and Yegappan Lakshmanan
e3c083832c
vim-patch:9.1.0335: String interpolation fails for List type ( #28364 )
...
Problem: String interpolation fails for List type
Solution: use implicit string(list) for string interpolation and :put =
(Yegappan Lakshmanan)
related: vim/vim#14529
closes : vim/vim#14556
https://github.com/vim/vim/commit/bce51d9005dd1c5bc002acbac2e12b649abcb013
Cherry-pick eval_to_string_eap() from patch 8.2.1914.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com >
2024-04-16 10:18:24 +08:00
zeertzjq and Yegappan Lakshmanan
43f8d7e3ef
vim-patch:9.1.0329: String interpolation fails for Dict type ( #28335 )
...
Problem: String interpolation fails for Dict type
Solution: Support Dict data type properly, also support :put =Dict
(without having to convert it to string() first)
(Yegappan Lakshmanan)
fixes : vim/vim#14529
closes : vim/vim#14541
https://github.com/vim/vim/commit/f01493c55062c01b1cdf9b1e946577f4d1bdddf3
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com >
2024-04-15 07:11:39 +08:00
zeertzjq and Yegappan Lakshmanan
db64280be5
vim-patch:8.2.3908: cannot use a script-local function for 'foldtext'
...
Problem: Cannot use a script-local function for 'foldtext'.
Solution: Expand "s:" and "<SID>". (Yegappan Lakshmanan, closes vim/vim#9411 )
https://github.com/vim/vim/commit/27708e6c7b6f444fd599f3dc5015336b002b874d
Cherry-pick test_filter_map.vim change from patch 8.2.3871.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com >
2023-08-17 13:14:32 +08:00
zeertzjq and Christ van Willegen
842a47d6a4
vim-patch:9.0.1704: Cannot use positional arguments for printf() ( #24719 )
...
Problem: Cannot use positional arguments for printf()
Solution: Support positional arguments in string formatting
closes : vim/vim#12140
https://github.com/vim/vim/commit/0c6181fec4c362eb9682d5af583341eb20cb1af5
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com >
2023-08-15 19:16:19 +08:00
zeertzjq
625926f729
vim-patch:9.0.1524: passing -1 for bool is not always rejected
...
Problem: Passing -1 for bool is not always rejected.
Solution: Check for error in a better way. (closes vim/vim#12358 )
https://github.com/vim/vim/commit/8cf51376b842e0060edf08bd2e5bd9933c552ecf
2023-05-08 22:53:43 +08:00
zeertzjq and Bram Moolenaar
d745433817
vim-patch:9.0.1522: some functions give two error messages
...
Problem: Some functions give two error messages.
Solution: Do not give a second error message. (closes vim/vim#12352 )
https://github.com/vim/vim/commit/e4098457ab9c94225b1b0e3c5e06b82b75587971
It seems that tv_get_bool() is actually not exactly the same as
tv_get_number(), so change it to a function instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-05-08 22:49:32 +08:00
zeertzjq
066db5e7cd
vim-patch:9.0.1500: The falsy operator is not tested properly ( #23407 )
...
Problem: The falsy operator is not tested properly.
Solution: Add a few more test cases. (closes vim/vim#12319 )
https://github.com/vim/vim/commit/58a44751cec55be1ace0d4be5367dc19bc56be5d
2023-04-30 23:24:16 +08:00
zeertzjq and Bram Moolenaar
9f29176033
vim-patch:9.0.1492: using uninitialized memory when argument is missing ( #23351 )
...
Problem: Using uninitialized memory when argument is missing.
Solution: Check there are sufficient arguments before the base.
(closes vim/vim#12302 )
https://github.com/vim/vim/commit/b7f2270bab102d68f83a6300699b7f98efad81f2
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-04-28 00:01:22 +08:00
zeertzjq and Yegappan Lakshmanan
43c49746d9
vim-patch:9.0.0335: checks for Dictionary argument often give a vague error ( #23309 )
...
Problem: Checks for Dictionary argument often give a vague error message.
Solution: Give a useful error message. (Yegappan Lakshmanan, closes vim/vim#11009 )
https://github.com/vim/vim/commit/04c4c5746e15884768d2cb41370c3276a196cd4c
Cherry-pick removal of E922 from docs from patch 9.0.1403.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com >
2023-04-25 21:32:12 +08:00
zeertzjq and Bram Moolenaar
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.
https://github.com/vim/vim/commit/0abc2871c105882ed1c1effb9a7757fad8a395bd
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-04-15 18:19:17 +08:00
zeertzjq and LemonBoy
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 )
https://github.com/vim/vim/commit/2eaef106e4a7fc9dc74a7e672b5f550ec1f9786e
Cherry-pick Test_Debugger_breakadd_expr() from Vim.
Co-authored-by: LemonBoy <thatlemon@gmail.com >
2023-04-15 17:59:32 +08:00
zeertzjq and Dundar Göc
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 )
https://github.com/vim/vim/commit/e41c1dd8890d3f701253255993f4e9af2d12225c
Co-authored-by: =?UTF-8?q?Dundar=20G=C3=B6c?= <gocdundar@gmail.com >
2023-04-15 17:15:04 +08:00
zeertzjq and Bram Moolenaar
408e5d16a9
vim-patch:8.2.4373: expression test fails
...
Problem: Expression test fails.
Solution: Make the test work with latest Vim9 syntax.
https://github.com/vim/vim/commit/c87aa34dfd68e95e4b1aac96d2274fcd672753ac
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-04-15 17:14:49 +08:00
zeertzjq and Bram Moolenaar
b29df57ba7
vim-patch:8.2.4361: Vim9: some tests fail
...
Problem: Vim9: some tests fail.
Solution: Fix the tests, mostly by removing "s:".
https://github.com/vim/vim/commit/62b191c38758c835a577ef091a803b6dd4cd4f49
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-04-15 17:14:30 +08:00
zeertzjq and Bram Moolenaar
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.
https://github.com/vim/vim/commit/fea43e44c008a7ca73b506ddab0f47b63b5d2126
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-04-15 17:09:42 +08:00
zeertzjq and Bram Moolenaar
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.
https://github.com/vim/vim/commit/bbd3e3c357487f7a5bdc704a819f63a7dd0dd66e
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 and Bram Moolenaar
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 )
https://github.com/vim/vim/commit/92b83ccfda7a1d654ccaaf161a9c8a8e01fbcf76
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-04-15 13:48:30 +08:00
zeertzjq and Bram Moolenaar
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 )
https://github.com/vim/vim/commit/9d8d0b5c644ea53364d04403740b3f23e57c1497
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-04-15 13:31:10 +08:00
zeertzjq and Bram Moolenaar
f12afd8e16
vim-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().
https://github.com/vim/vim/commit/1310660557470a669cc64b359e20666b116e5dbd
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-04-14 18:04:12 +08:00
zeertzjq and Bram Moolenaar
d6e2804ab4
vim-patch:8.2.1794: no falsy Coalescing operator
...
Problem: No falsy Coalescing operator.
Solution: Add the "??" operator. Fix mistake with function argument count.
https://github.com/vim/vim/commit/92f26c256e06277ff2ec4ce7adea1eb58c85abe0
Cherry-pick tv2bool() into eval/typval.c.
Cherry-pick *??* tag from Vim runtime.
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-04-14 18:04:09 +08:00
zeertzjq and Bram Moolenaar
3ad8458824
vim-patch:8.2.1067: expression "!expr->func()" does not work ( #22585 )
...
Problem: Expression "!expr->func()" does not work.
Solution: Apply plus and minus earlier. (closes vim/vim#6348 )
https://github.com/vim/vim/commit/0b1cd52ff6bf690388f892be686a91721a082e55
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-03-09 13:47:01 +08:00
dundargoc
af23d17388
test: move oldtests to test directory ( #22536 )
...
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.
2023-03-07 11:13:04 +08:00