| Commit message (Collapse) | Author | Age |
... | |
|/ |
|
| |
|
|
|
|
| |
add cchar_to_string
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This fixes memory leak reported by ASAN. This also somehow fixes test40, though
I have no idea why except that that test yields memory leak report.
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: when processing cycle such as
:for pat in [' \ze*', ' \zs*']
: try
: let l = matchlist('x x', pat)
: $put ='E888 NOT detected for ' . pat
: catch
: $put ='E888 detected for ' . pat
: endtry
:endfor
`:let l = …` throwing an error causes this error to be caught after
color_cmdline attempts to get callback for highlighting next line (the one with
`$put = 'E888 NOT…`). Saving/restoring state prevents this from happening.
|
|
|
|
|
|
|
|
| |
Problem: When creating a bufref, then using :bwipe and :new it might get
the same memory and bufref_valid() returns true.
Solution: Add br_fnum to check the buffer number didn't change.
https://github.com/vim/vim/commit/45e5fd135da5710f24a1acc142692f120f8b0b78
|
|
|
|
|
|
|
| |
* Add api function get keymap
nvim_get_keymap(mode)
nvim_buf_get_keymap(buffer, mode)
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also re-word some error messages:
- "Key does not exist: %s"
- "Invalid channel: %<PRIu64>"
- "Request array size must be 4 (request) or 3 (notification)"
- "String cannot contain newlines"
References #6150
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Closes #5984
|
| | |
|
|\| |
|
| |
| |
| |
| |
| | |
- nvim_get_option should return the global default of a local option.
- nvim_set_option should set the global default of a local option.
|
| | |
|
| |
| |
| |
| | |
Function was renamed and changed to return `const char *`.
|
| |
| |
| |
| | |
Also fixes buffer reusage in setmatches() and complete().
|
| | |
|
| |
| |
| |
| |
| |
| | |
Fixes problem introduced by “api: Allow kObjectTypeNil to be zero without
breaking compatibility”: apparently there are clients which use metadata and
there are which aren’t. For the first that commit would not be needed, for the
second that commit misses this critical piece.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During testing found the following bugs:
1. msgpack-gen.lua script is completely unprepared for Float values either in
return type or in arguments. Specifically:
1. At the time of writing relevant code FLOAT_OBJ did not exist as well as
FLOATING_OBJ, but it would be used by msgpack-gen.lua should return type
be Float. I added FLOATING_OBJ macros later because did not know that
msgpack-gen.lua uses these _OBJ macros, otherwise it would be FLOAT_OBJ.
2. msgpack-gen.lua should use .data.floating in place of .data.float. But it
did not expect that .data subattribute may have name different from
lowercased type name.
2. vim_replace_termcodes returned its argument as-is if it receives an empty
string (as well as _vim_id*() functions did). But if something in returned
argument lives in an allocated memory such action will cause double free:
once when freeing arguments, then when freeing return value. It did not cause
problems yet because msgpack bindings return empty string as {NULL, 0} and
nothing was actually allocated.
3. New code in msgpack-gen.lua popped arguments in reversed order, making lua
bindings’ signatures be different from API ones.
|
|
|
| |
Fixes #6147
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reasonings:
1. It is not used for anything, but scope dictionaries currenly. So there is no
need to generalize and split it into dict_set_var (which will contain some
scope-dictionary-specific checks) and dict_set_value (which will work for any
dictionary).
2. Check for key size is no longer valid for non-scope dictionaries: you *can*
use empty keys there. In scope dictionaries also, but you actually are not
supposed to store there anything, but variables.
Note that actually one may still do
let b:[''] = 1
and “bypass” check for variable name. It won’t change what `echo b:` will show,
but it may affect code which iterates over scope dictionary keys and sets them
to something (if there is such code).
|
|
|
|
| |
Even though all used compilers can swallow this code, it is still
undefined behaviour.
|
|
|
|
|
|
|
|
| |
v7.4.2024 changed a few function signatures of functions that we use in
Neovim-specific code, e.g. the API.
Due to that the commit for 7.4.2024 doesn't build on its own, only together with
this commit.
|
| |
|
|
|
|
|
| |
Works by making value pushed on stack represent the exhausted list.
Fixes #5901, except for dictionaries which need similar adjustment.
|
| |
|
| |
|
|
|
|
|
| |
Also fixed dumping of partials by encode_vim_to_object and added code which is
able to work with partials and dictionaries to test/unit/eval/helpers.lua
(mostly copied from #5119, except for partials handling).
|
|
|
| |
Fixed local test failures somewhere in process.
|
| |
|
|
|
|
|
| |
This makes gdb backtraces much more meaningful: specifically I now know at which
line it crashes in place of seeing that it crashes at
TYPVAL_ENCODE_DEFINE_CONV_FUNCTIONS macros invocation.
|
|
|
|
|
|
| |
Is known to crash in the current state.
Ref #5825.
|
|
|
|
|
|
|
|
|
|
| |
Problem: Leaking memory when there is a cycle involving a job and a
partial.
Solution: Add a copyID to job and channel. Set references in items referred
by them. Go through all jobs and channels to find unreferenced
items. Also, decrement reference counts when garbage collecting.
https://github.com/vim/vim/commit/107e1eef1df3b786ad3ad49fbdb9e058649303b5
|
|
|
|
|
|
|
| |
Problem: Passing cookie to a callback is clumsy.
Solution: Change function() to take arguments and return a partial.
https://github.com/vim/vim/commit/1735bc988c546cc962c5f94792815b4d7cb79710
|
|\
| |
| | |
doc: api_info(), typval_encode.h
|
| |
| |
| |
| | |
Annotate TYPVAL_ENCODE_DEFINE_CONV_FUNCTIONS to aid code navigation.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
Since data.integer is a different (larger) integer type than
data.{buffer,window,tabpage}, we cannot abuse the union by using
data.integer to access the value for all 4 types. Instead, remove the
{buffer,window,tabpage} members and always use the integer member.
In order to accomodate this, perform distinct validation and coercion
between the Integer type and Buffer/Window/Tabpage types in
object_to_vim, msgpack_rpc helpers, and gendispatch.lua.
|