| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
| |
Problem: Error for const argument to mapnew().
Solution: Don't give an error. (closes vim/vim#7400)
https://github.com/vim/vim/commit/57cf4973a283941c92744554474b2c52ce892fd1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Memory leak when map() fails.
Solution: Clear the typval.
https://github.com/vim/vim/commit/c56936e2ba4fd219f56aab616fcb283132455697
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: map() may change the list or dict item type.
Solution: Add mapnew().
https://github.com/vim/vim/commit/ea696852e7abcdebaf7f17a7f23dc90df1f5e2ed
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
| |
followup to #24109
fix #16150
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: cannot assign to range in list.
Solution: Implement overwriting a list range.
https://github.com/vim/vim/commit/4f0884d6e24d1d45ec83fd86b372b403177d3298
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: not enough tests.
Solution: Also run existing tests for Vim9 script. Make errors more
consistent.
https://github.com/vim/vim/commit/f47c5a8e2d8eda7c2c8a9cccf9568eb56c03a0cf
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: cannot use a range with :unlet.
Solution: Implement ISN_UNLETRANGE.
https://github.com/vim/vim/commit/5b5ae29bd3d7b832b6f15320430f7f191e0abd1f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
| |
This reverts commit 82cd0be2eaf71c0476e15c66ba3e83c76896d407.
|
|
|
|
|
|
|
|
| |
Removes the `getoption_T` struct and also introduces the `OptVal` struct
to unify the methods of getting/setting different option value types.
This is the first of many PRs to reduce code duplication in the Vim
option code as well as to make options easier to maintain. It also
increases the flexibility and extensibility of options. Which opens the
door for things like Array and Dictionary options.
|
|
|
|
|
|
|
|
|
| |
Problem: Cursor ends up below the window after a put.
Solution: Mark w_crow and w_botline invalid when changing the cursor line.
(closes vim/vim#12465)
https://github.com/vim/vim/commit/8509014adda188ee8bdf6a2e123fbf15a91b29d2
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
| |
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>
|