Problem: Not enough documentation for Blobs.
Solution: Add a section about Blobs.
d89682477c
Include doc changes for empty() from v7.4.1274.
Include some minor typo fixes.
Problem: Using freed memory, for loop over blob leaks memory.
Solution: Clear pointer after freeing memory. Decrement reference count
after for loop over blob.
ecc8bc482b
Strings that previously decoded into a msgpack special for representing
BINs with NULs now convert to Blobs. It shouldn't be possible to decode
into this special anymore after this change?
Notably, Lua strings with NULs now convert to Blobs when passed to VimL.
As Strings and Blobs are encoded as msgpack BINs, the current ShaDa
implementation will restore global Blob variables as Strings (or msgpack
special dicts if they contain NULs).
Encode an additional element with Blob globals to differentiate them
from Strings so that we can restore them with the correct type.
Adjust variables_spec.lua's autotest() to also check for proper type.
Problem: Code for Blob not sufficiently tested.
Solution: Add more tests. Fix uncovered crash. Add test_null_blob().
c0f5a78c15
eval0 and ex_echo's emsg-specific changes have already been ported.
These tests uncover another crash that was fixed in v8.1.0738.
Problem: Cannot handle binary data.
Solution: Add the Blob type. (Yasuhiro Matsumoto, closesvim/vim#3638)
6e5ea8d2a9
Nvim-specific Blob conversions are implemented in future commits.
Refactor write_blob() to use a FileDescriptor, as f_writefile() was
refactored to use one (does not apply to read_blob()).
Use var_check_lock() in f_add() for Blobs from v8.1.0897.
Add a modeline to test_blob.vim and fix some doc typos.
Include if_perl.txt's VIM::Blob() documentation. Interestingly, this
function already worked before this port, as it just returns a Blob
string literal, not an actual Blob object.
N/A patches for version.c:
vim-patch:8.1.0741: viminfo with Blob is not tested
Problem: Viminfo with Blob is not tested.
Solution: Extend the viminfo test. Fix reading a blob. Fixed storing a
special variable value.
8c8b8bb56c
vim-patch:8.1.1022: may use NULL pointer when out of memory
Problem: May use NULL pointer when out of memory. (Coverity)
Solution: Check for blob_alloc() returning NULL.
e142a9467a
This generalizes diagnostic handling outside of just the scope of LSP.
LSP clients are now a specific case of a diagnostic producer, but the
diagnostic subsystem is decoupled from the LSP subsystem (or will be,
eventually).
More discussion at [1].
[1]: https://github.com/neovim/neovim/pull/15585
* Simplify rpc encode/decode messages to rpc.send/rcp.receive
* Make missing handlers message throw a warning
* Clean up formatting style in log
* Move all non-RPC loop messages to trace instead of debug
* Add format func option to log to allow newlines in per log entry
It's possible for weirdness to happen if curbuf is modified while
sourcing from it via :source (with no arguments). For example:
- Deleting lines from or wiping curbuf can cause internal error E315 to
be thrown from ml_get.
- Changing the curbuf to another buffer while sourcing can cause lines
from the new curbuf to then be sourced instead.
Problem:
Anonymous :source (no args) and nvim_exec() don't support Vimscript line continuations.
Solution:
Factor out the concat logic into concat_continued_line() and a
CONCAT_CONTINUED_LINES macro for simple concatenations where lines are
fetched individually.
Closes#14807
Example assertion failure:
%0 in logmsg neovim/src/nvim/log.c:139:17
%1 in ui_call_update_menu neovim/build/src/nvim/auto/ui_events_call.generated.h:8:3
%2 in ex_menu neovim/src/nvim/menu.c:263:3
%3 in do_one_cmd neovim/src/nvim/ex_docmd.c:1981:5
%4 in do_cmdline neovim/src/nvim/ex_docmd.c:602:20
%5 in do_cmdline_cmd neovim/src/nvim/ex_docmd.c:287:10
%6 in free_all_mem neovim/src/nvim/memory.c:596:3
%7 in os_exit neovim/src/nvim/main.c:574:3
%8 in exit_event neovim/src/nvim/msgpack_rpc/channel.c:569:5
Problem: Vim9: a failing debug expression aborts script sourcing.
Solution: Do not let expression failure abort script sourcing. (closesvim/vim#8848)
072f1c6888
Vim9script is N/A, exclude Test_Debugger_breakadd_expr.
Move debuggy struct to before generated header inclusion so
eval_expr_restore prototype works.
Add CheckRunVimInTerminal to Test_Debugger_breakadd.
Cherry-pick Test_Debugger_breakadd changes from v8.2.1440, v8.2.1736.
Problem: Vim script debugger functionality needs cleanup.
Solution: Move debugger code to a separate file. Add more tests. (Yegappan
Lakshmanan, closesvim/vim#4285)
eead75c5e8
Good to have for eval_expr_restore in v8.2.3417.
Doesn't actually add any tests.
Otherwise the users site packages will be loaded from ~/.local/share/nvim/site
which can cause unexpected error messages and other kinds of mayhem
Simpler alternative: use "--noplugin". Shouldn't be done because:
(1) these tests should test the ordinary startup code path as close as possible
(2) tests that test the loading of site packages will be added here very soon
Problem: 0o777 not recognized as octal.
Solution: Use vim_isodigit(). (Ken Takata, closesvim/vim#7633, closesvim/vim#7631)
c37b655443
:scriptversion is N/A.
Problem: Cannot use octal numbers in scriptversion 4.
Solution: Add the "0o" notation. (Ken Takata, closesvim/vim#5304)
c17e66c5c0
:scriptversion is N/A.
Cherry-pick latest str2nr() doc changes from v8.1.2035.
Cherry-pick various mentions of the 0o prefix from:
- v8.2.2324
- 2346a63784
- 11e3c5ba82
- 82be4849ee
Patch used ascii_isbdigit() by mistake, which was fixed in v8.2.2309.
Make STR2NR_OOCT work the same as STR2NR_OCT when forcing.
In Vim, STR2NR_FORCE | STR2NR_OOCT isn't handled, and doesn't actually
force anything. Rather than abort(), make it work as STR2NR_OCT.
This means STR2NR_FORCE | STR2NR_OCT works the same as
STR2NR_FORCE | STR2NR_OOCT and STR2NR_FORCE | STR2NR_OCT | STR2NR_OOCT.
Problem: Not sufficient testing for quoted numbers.
Solution: Add a few more test cases.
ea8dcf8346
:scriptversion is N/A.
Already added more quote tests in the port of v8.1.2036.
Problem: The str2nr() tests fail.
Solution: Add missing part of patch.
1ac90b4fa6
Add extra tests for quoted numbers in vim_str2nr_spec.lua, as the
included ones in this patch are somewhat lacking.
Problem: Recognizing octal numbers is confusing.
Solution: Introduce scriptversion 4: do not use octal and allow for single
quote inside numbers.
60a8de28d1
:scriptversion is N/A.
Cherry-pick Test_readfile_binary() from v8.1.0742.
Note that this patch was missing vim_str2nr() changes, and so fails the
tests; this was fixed in v8.1.2036.