| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| | |
Adds new API helper macros `CSTR_AS_OBJ()`, `STATIC_CSTR_AS_OBJ()`, and `STATIC_CSTR_TO_OBJ()`, which cleans up a lot of the current code. These macros will also be used extensively in the upcoming option refactor PRs because then API Objects will be used to get/set options. This PR also modifies pre-existing code to use old API helper macros like `CSTR_TO_OBJ()` to make them cleaner.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reduces the total number of khash_t instantiations from 22 to 8.
Make the khash internal functions take the size of values as a runtime
parameter. This is abstracted with typesafe Map containers which
are still specialized for both key, value type.
Introduce `Set(key)` type for when there is no value.
Refactor shada.c to use Map/Set instead of khash directly.
This requires `map_ref` operation to be more flexible.
Return pointers to both key and value, plus an indicator for new_item.
As a bonus, `map_key` is now redundant.
Instead of Map(cstr_t, FileMarks), use a pointer map as the FileMarks struct is
humongous.
Make `event_strings` actually work like an intern pool instead of wtf it
was doing before.
|
| |
| |
| | |
Because python2 provider is no longer supported.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Coverity reports dead code.
Solution: Remove the dead code.
https://github.com/vim/vim/commit/8bead9a058907e7f10ad25893d8475d2d9dd173c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Various comment and indent flaws.
Solution: Improve comments and indenting.
https://github.com/vim/vim/commit/88456cd3c49a3dd1fda17cf350daa9b8216b1aa6
Omit test_function_lists.vim change as that file is likely not
applicable to Nvim due to the existence of Nvim-only functions.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Catch does not work when lines are joined with a newline.
Solution: Set "nextcmd" appropriately. (closes vim/vim#12348)
https://github.com/vim/vim/commit/f2588b6fc90ba85b333ee8f747e8d1ebbc7e6300
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
expression error
Problem: A user command with try/catch may not catch an expression error.
Solution: When an expression fails check for following "|". (closes vim/vim#7469)
https://github.com/vim/vim/commit/8143a53c533bc7776c57e5db063d185bdd5750f3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: When an expression fails getting the next command may be wrong.
Solution: Do not check for a next command after :eval fails. (closes vim/vim#7415)
https://github.com/vim/vim/commit/d0fe620cbbf5f5e00446efa89893036265c5c302
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Inconsistent capitalization in error messages.
Solution: Make capitalization consistent. (Doug Kearns)
https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Inconsistent capitalization of error messages.
Solution: Always start with a capital.
https://github.com/vim/vim/commit/7707228aace9aff16434edf5377a354c6ad07316
Most of these errors are Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: blob index and slice not implemented yet.
Solution: Implement blob index and slice.
https://github.com/vim/vim/commit/cfc3023cb6ce5aaec13f49bc4b821feb05e3fb03
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Using inclusive index for slice is not always desired.
Solution: Add the slice() method, which has an exclusive index. (closes
vim/vim#7408)
https://github.com/vim/vim/commit/6601b62943a19d4f8818c3638440663d67a17b6a
Cherry-pick a line in docs added later.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: cannot index or slice a variable with type "any".
Solution: Add runtime index and slice.
https://github.com/vim/vim/commit/cc673e746ab98566556ff964d7a76f2fb46d7f84
Missing changes from the last PR.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: string slice not supported yet.
Solution: Add support for string slicing.
https://github.com/vim/vim/commit/11107bab7ead9124f46a7ddf6aa3bb66b43a8246
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: string indexes are counted in bytes.
Solution: Use character indexes. (closes vim/vim#6574)
https://github.com/vim/vim/commit/e3c37d8ebf9dbbf210fde4a5fb28eb1f2a492a34
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: cannot index or slice a variable with type "any".
Solution: Add runtime index and slice.
https://github.com/vim/vim/commit/cc673e746ab98566556ff964d7a76f2fb46d7f84
Omit E1024 and E1062: Vim9 script only.
Omit string_slice() and char_idx2byte(): Vim9 script only.
Remove the first tv_is_luafunc() check because it always returns false.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: list slice not supported yet.
Solution: Add support for list slicing.
https://github.com/vim/vim/commit/ed5918771fcf9877d8445e74c62ab1ce6b8e28c1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: cannot assign to [var; var].
Solution: Assign rest of items to a list.
https://github.com/vim/vim/commit/9af78769eeae0318e07aa8b6af4d6e2244481ca7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| | |
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#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>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot use an import in the "expr" part of 'spellsuggest'.
Solution: Set the script context when evaluating "expr" of 'spellsuggest'.
https://github.com/vim/vim/commit/2a7aa834583dea157eccf3e69827d2ff1d9fe9c7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot use an import in 'charconvert'.
Solution: Set the script context when evaluating 'charconvert'. Also expand
script-local functions in 'charconvert'.
https://github.com/vim/vim/commit/f4e88f2152c5975a6f4cfa7ccd745575fe4d1c78
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot use an import in 'patchexpr'.
Solution: Set the script context when evaluating 'patchexpr'. Do not
require 'patchexpr' to return a bool, it was ignored anyway.
https://github.com/vim/vim/commit/36c2add7f82bc5dbbfc45db31953ef9633c635b3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Memory leak when evaluating 'diffexpr'.
Solution: Use free_tv() instead of clear_tv().
https://github.com/vim/vim/commit/39b8944539a9cde553fe709e535fdfd37d0f9307
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: cannot use an import in 'diffexpr'.
Solution: Set the script context when evaluating 'diffexpr'. Do not require
'diffexpr' to return a bool, it was ignored anyway.
https://github.com/vim/vim/commit/7b29f6a3949743914f08410b6f6bd6237c2f2038
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
expression (#23132)
Problem: Invalid memory access with recursive substitute expression.
Solution: Check the return value of vim_regsub().
https://github.com/vim/vim/commit/3ac1d97a1d9353490493d30088256360435f7731
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Members of funccall_T are inconsistently named.
Solution: Use the "fc_" prefix for all members.
https://github.com/vim/vim/commit/ca16c60f337ed33d5dd66a6e90aaf95b619c5e47
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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)
https://github.com/vim/vim/commit/2ef9156b4284e4a52613c36e3d4667245273a28d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Warning for uninitialized variable.
Solution: Set return value to FAIL.
https://github.com/vim/vim/commit/744aecf8777e86fac6d30f072e90e2de353b8ea1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Crash when using a null function reference. (Naohiro Ono)
Solution: Check for an invalid function name. (closes vim/vim#8367)
https://github.com/vim/vim/commit/22db0d549f64aa3d8a6e366b70eb8d7e66933b82
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Crash whn calling partial.
Solution: Check for NULL pointer. (Dominique Pellé, closes vim/vim#8202)
https://github.com/vim/vim/commit/fe8ebdbe5c4e116311c0c0d5937b89ded5c92d01
Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form.
https://github.com/vim/vim/commit/1e56bda9048a9625bce6e660938c834c5c15b07d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: String interpolation fails when not evaluating.
Solution: Skip the expression when not evaluating. (closes vim/vim#10398)
https://github.com/vim/vim/commit/70c41241c2701f26a99085e433925a206ca265a3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: v_lock not set when getting value of environment variable.
Solution: Set v_lock to zero.
https://github.com/vim/vim/commit/16e63e6d353c8b7337470644ceac02dc5e569db9
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Using "name" for a string result is confusing.
Solution: Rename to "end".
https://github.com/vim/vim/commit/1e0b7b11db61bd906266d3174fee0bbaf20a101f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#23086)
Problem: Inconsistent naming of get_list_tv() and eval_dict().
Solution: Rename get_list_tv() to eval_list(). Similarly for eval_number(),
eval_string(), eval_lit_string() and a few others.
https://github.com/vim/vim/commit/9a78e6df17033223ebdf499f2b02b2538601c52d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Code using EVAL_CONSTANT is dead, it is never set.
Solution: Remove EVAL_CONSTANT. (closes vim/vim#12252)
https://github.com/vim/vim/commit/b7f6f93475a3ad5c590a09a2577fd51590bea9e1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Failure after trinary expression fails.
Solution: Restore eval_flags. (Yasuhiro Matsumoto, closes vim/vim#6776)
https://github.com/vim/vim/commit/69e44552c567ff25b363ba0790ad3d43fa0397a7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: line continuation in lambda doesn't always work.
Solution: Do not use a local evalarg unless there isn't one. (closes vim/vim#6439)
https://github.com/vim/vim/commit/8af81d656a4c501611f6211b6379ea9dd650c545
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: crash when using variable in a loop at script level.
Solution: Do not clear the variable if a function was defined.
Do not create a new entry in sn_var_vals every time.
(closes vim/vim#8628)
https://github.com/vim/vim/commit/2eb6fc3b52148f961e804ec2be361d531ff770d8
Omit eval_cstack: Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Unused assignments in expression evaluation.
Solution: Move declarations and assignments to inner blocks where possible.
https://github.com/vim/vim/commit/3ac9c4701a5f1e39303ca2885956db92215966db
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|