| Commit message (Collapse) | Author | Age |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: We want to deprecate `nvim_err_write(ln)()` but there is no
obvious replacement (from Lua). Meanwhile we already have
`nvim_echo()` with an `opts` argument.
Solution: Add `err` argument to `nvim_echo()` that directly maps to
`:echoerr`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: exception handling can be improved
Solution: add v:stacktrace and getstacktrace()
closes: vim/vim#16360
https://github.com/vim/vim/commit/663d18d6102f40d14e36096ec590445e61026ed6
Co-authored-by: ichizok <gclient.gaap@gmail.com>
Co-authored-by: Naruhiko Nishino <naru123456789@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`termopen` has long been a superficial wrapper around `jobstart`, and
has no real purpose. Also, `vim.system` and `nvim_open_term` presumably
will replace all features of `jobstart` and `termopen`, so centralizing
the logic will help with that.
Solution:
- Introduce `eval/deprecated.c`, where all deprecated eval funcs will live.
- Introduce "term" flag of `jobstart`.
- Deprecate `termopen`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: The name `scope` is often used to refer to option flags because
`OPT_LOCAL` and `OPT_GLOBAL` are often used to determine the option
scope. This leads to the name `req_scope` being used for actual option
scopes instead.
Solution: Since the end-goal is to remove `OPT_LOCAL` and `OPT_GLOBAL`
entirely and replace them with `OptScope`, rename `OptScope` variables
to `scope` and the old scope flag variables to `opt_flags`.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: too many strlen() calls in eval.c
Solution: Refactor eval.c to remove calls to STRLEN()
(John Marriott)
closes: vim/vim#16066
https://github.com/vim/vim/commit/bd4614f43d0eac4aff743132bab8e53b015ac801
Co-authored-by: John Marriott <basilisk@internode.on.net>
|
| |
| |
| |
| |
| |
| | |
Problem: Separate message emitted for each newline present in Lua
print() arguments.
Solution: Make msg_multiline() handle NUL bytes. Refactor print() to use
msg_multiline(). Refactor vim.print() to use print().
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
The way option scopes currently work is inflexible and does not allow for nested
option scopes or easily finding the value of an option at any arbitrary scope
without having to do long handwritten switch-case statements like in
`get_varp()`. `.indir` is also confusing and redundant since option indices for
each scope can be autogenerated.
Solution:
Expand option scopes in such a way that an option can support any amount of
scopes using a set of scope flags, similarly to how it's already done for option
types. Also make options contain information about its index at each scope it
supports. This allows for massively simplifying `get_varp()` and
`get_varp_scope()` in the future by just using a struct for options at each
scope. This would be done by creating a table that stores the offset of an
option's variable at a scope by using the option's index at that scope as a key.
This PR also autogenerates enums for option indices at each scope to remove the
need for `.indir` entirely, and also to allow easily iterating over options all
options that support any scope.
Ref: #29314
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Lua callbacks for "msg_show" events with vim.ui_attach() are
executed when it is not safe.
Solution: Disallow non-fast API calls for "msg_show" event callbacks.
Automatically detach callback after excessive errors.
Make sure fast APIs do not modify Nvim state.
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Highlight group id is not propagated to the end of the message call
stack, where ext_messages are emitted.
Solution: Refactor message functions to pass along highlight group id
instead of attr id.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: 'findexpr' can't be used for lambads
(Justin Keyes)
Solution: Replace the findexpr option with the findfunc option
(Yegappan Lakshmanan)
related: vim/vim#15905
closes: vim/vim#15976
https://github.com/vim/vim/commit/a13f3a4f5de9c150f70298850e34747838904995
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
argument
Problem: 'findexpr' completion doesn't set v:fname to cmdline argument.
Solution: Set v:fname to the cmdline argument as-is (zeertzjq).
closes: vim/vim#15934
https://github.com/vim/vim/commit/20e045f78148c0ef0143c33ffe686fee72d29376
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: cannot easily adjust the |:find| command
Solution: Add support for the 'findexpr' option (Yegappan Lakshmanan)
closes: vim/vim#15901
closes: vim/vim#15905
https://github.com/vim/vim/commit/aeb1c97db5b9de4f4903e7f288f2aa5ad6c49440
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| | |
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
- "process" is often used as a verb (`multiqueue_process_events`), which
is ambiguous for cases where it's used as a topic.
- The documented naming convention for processes is "proc".
- `:help dev-name-common`
- Shorter is better, when it doesn't harm readability or
discoverability.
Solution:
Rename "process" => "proc" in all C symbols and module names.
|
| |
| |
| |
| |
| |
| | |
In Vim a lot of filesystem functions have been moved to filepath.c.
However, some of these functions actually deal with file contents, and
Nvim's filesystem-related functions are spread out in a different way.
Therefore, it's better to use a different file for these functions.
|
| |
| |
| |
| |
| |
| |
| | |
This also makes shada reading slightly faster due to avoiding
some copying and allocation.
Use keysets to drive decoding of msgpack maps for shada entries.
|
| |
| |
| |
| |
| |
| | |
- common_function() has always been in evalfunc.c in Vim
- return_register() has always been in evalfunc.c in Vim
- get_user_input() was moved to ex_getln.c in Vim 8.1.1957
- tv_get_lnum_buf() was moved to typval.c in Vim 8.2.0847
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Wrong comment for "len" argument of call_simple_func().
Solution: Remove the "or -1 to use strlen()". Also change its type to
size_t to remove one cast. (zeertzjq)
closes: vim/vim#15410
https://github.com/vim/vim/commit/c1ed788c1b41db9b5f1ef548dc877f771f535bbe
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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'.
https://github.com/vim/vim/commit/a4e0b9785e409e9e660171cea76dfcc5fdafad9b
vim-patch:9.0.0635: build error and compiler warnings
Problem: Build error and compiler warnings.
Solution: Add missing change. Add type casts.
https://github.com/vim/vim/commit/3292a229402c9892f5ab90645fbfe2b1db342f5b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Calling a function from an "expr" option has too much overhead.
Solution: Add call_simple_func() and use it for 'foldexpr'
https://github.com/vim/vim/commit/87b4e5c5db9d1cfd6f2e79656e1a6cff3c69d15f
Cherry-pick a call_func() change from patch 8.2.1343.
Add expr-option-function docs to options.txt.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: eval5() and eval7 are too complex
Solution: Refactor eval5() and eval7() in eval.c
(Yegappan Lakshmanan)
closes: vim/vim#14900
https://github.com/vim/vim/commit/734286e4c626f80ace27eeb252a5e384e798aebf
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: eval.c code too complex
Solution: refactor eval6() and eval9() functions into several smaller
functions (Yegappan Lakshmanan)
closes: vim/vim#14875
https://github.com/vim/vim/commit/51c45e89b50a4841147b9fbd7c6095ab79a10c71
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: too long functions in eval.c
Solution: refactor functions (Yegappan Lakshmanan)
closes: vim/vim#14755
https://github.com/vim/vim/commit/4ceb4dc825854032eed423ec1fc372317d3420bf
The remaining eval_expr_typval() changes.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Coverity warning after 9.1.0440
Solution: Fix Coverity warning, add a test and
reduce the calls to clear_tv()
(Yegappan Lakshmanan).
closes: vim/vim#14845
https://github.com/vim/vim/commit/dbac0da631c66869f41c3c573ad7a8cfef95964d
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Some functions are not tested
Solution: Add a few more tests, fix a few minor problems
(Yegappan Lakshmanan)
closes: vim/vim#14789
https://github.com/vim/vim/commit/fe424d13ef6e5486923f23f15bb6951e3079412e
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: too long functions in eval.c
Solution: refactor functions (Yegappan Lakshmanan)
closes: vim/vim#14755
https://github.com/vim/vim/commit/4ceb4dc825854032eed423ec1fc372317d3420bf
Skip the eval_expr_typval() changes.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot use a method with a complex expression.
Solution: Evaluate the expression after "->" and use the result.
https://github.com/vim/vim/commit/c665dabdf4c49a0fbf1dc566253c75c2abe2effa
Cherry-pick a "verbose" check from patch 8.2.4123.
N/A patches for version.c:
vim-patch:8.2.4102: Vim9: import cannot be used after method
vim-patch:8.2.4110: Coverity warns for using NULL pointer
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: cannot use += to append to empty NULL list.
Solution: Copy the list instead of extending it. (closes vim/vim#6998)
https://github.com/vim/vim/commit/81ed4960482f8baabdd7f95b4d5e39744be88ae7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
removed (#29572)
Problem: the recursive parameter in the *_equal functions can be removed
Solution: Remove the recursive parameter in dict_equal(), list_equal()
object_equal and tv_equal(). Use a comparison of the static
var recursive_cnt == 0 to determine whether or not tv_equal()
has been called recursively (Yinzuo Jiang).
closes: vim/vim#15070
https://github.com/vim/vim/commit/7ccd1a2e858dbb2ac7fb09971dfcbfad62baa677
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a breaking change which will make refactor of typval and shada
code a lot easier. In particular, code that would use or check for
v:msgpack_types.binary in the wild would be broken. This appears to be
rarely used in existing plugins.
Also some cases where v:msgpack_type.string would be used to represent a
binary string of "string" type, we use a BLOB instead, which is
vimscripts native type for binary blobs, and already was used for BIN
formats when necessary.
msgpackdump(msgpackparse(data)) no longer preserves the distinction
of BIN and STR strings. This is very common behavior for
language-specific msgpack bindings. Nvim uses msgpack as a tool to
serialize its data. Nvim is not a tool to bit-perfectly manipulate
arbitrary msgpack data out in the wild.
The changed tests should indicate how behavior changes in various edge
cases.
|
| |
| |
| |
| |
| | |
revert: "refactor: use S_LEN(s) instead of s, n (#29219)"
This reverts commit c37695a5d5f2e8914fff86f3581bed70b4c85d3c.
|
| |\
| | |
| | | |
refactor(memory): use builtin strcat() instead of STRCAT()
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The latter was mostly relevant with the past char_u madness.
NOTE: STRCAT also functioned as a counterfeit "NOLINT" for clint
apparently. But NOLINT-ing every usecase is just the same as disabling
the check entirely.
|
| |/ |
|
| | |
|
| | |
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: function get_lval() is too long
Solution: factor out the get_lval_subscript() function
(Yegappan Lakshmanan)
closes: vim/vim#14839
https://github.com/vim/vim/commit/44cadaa18c1816f7a576f1870790ee01a23c1071
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
number (#28962)
Problem: Strange error message when using islocked() with a number.
(Yegappan Lakshmanan)
Solution: Check that the name is empty.
https://github.com/vim/vim/commit/1840a7b4e3577e617f724c9d07ccc78195cc010a
Use ll_name_len instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: The set_ref_in_item() function is too long.
Solution: Use a separate function for more complicated types. (Yegappan
Lakshmanan, closes vim/vim#11802)
https://github.com/vim/vim/commit/ea125393af01ecaf75cee8e085a57f8143f3ae3e
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: closure cannot store value in outer context.
Solution: Make storing value in outer context work. Make :disassemble
accept a function reference.
https://github.com/vim/vim/commit/b68b346e6db6d3f848e0a89905fcd7777b73c5d8
Funcstack is Vim9script-only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |\
| | |
| | | |
fix(lua): vim.fn.has('nvim-0.10') in fast context, used by vim.deprecate
|
| | | |
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|