Contains the exit value nvim will use.
Before exiting, it is v:null. That way jobs or autocmds (in VimLeavePre or
VimLeave) can check if Neovim is about to quit and with what exit value.
Closes#4666.
STR_CASE previously used a NULL data pointer for the String object, but
this pushes the NULL checks to the rest of the code. Instead,
allocating an empty string solves the same issue of there not being any
data but ensures that we're not passing NULL to functions that don't
expect it.
Closes#5627
Since the rbuffer contents are used by string functions (like sscan,
strlen, etc.), it is not safe to use uninitialized memory. Using
xcalloc ensures the string-based functions do not run past the end of
the buffer.
Closes#5676
The man plugin uses `v:count == v:count1` to detect if a count was explicitly
given. Unfortunately v:count1 does _not_ default to 1 but 0 during startup.
Now we set v:count1 to 1 early.
Fixes https://github.com/neovim/neovim/issues/5655
Problem: When using try/catch in 'tabline' it is still considered an
error and the tabline will be disabled.
Solution: Check did_emsg instead of called_emsg. (haya14busa, closes#746)
f73d3bc253
Problem: When using try/catch in 'statusline' it is still considered an
error and the status line will be disabled.
Solution: Check did_emsg instead of called_emsg. (haya14busa, closesvim/vim#729)
a742e084b6
Problem: Using the system default encoding makes tests unpredictable.
Solution: Always use utf-8 or latin1 in the new style tests. Remove setting
encoding and scriptencoding where it is not needed.
ac105ed3c4
Attempting to serialize a NULL string through msgpack results in
msgpack_sbuffer_write attempting to memcpy from a NULL pointer, which is
undefined behavior.
The existing code would cause utf8len_tab to be declared as non-extern
when main.cpp included globals.h as well as in mbyte.c. This causes the
following warning
Linking C executable ../../bin/nvim
/usr/bin/ld: Warning: size of symbol `utf8len_tab' changed from 256 in CMakeFiles/nvim.dir/main.c.o to 320 in CMakeFiles/nvim.dir/mbyte.c.o
Moving the definition to globals.h and using INIT() ensures the array is
only defined in main.cpp and other places globals.h is included see an
extern declaration.
This fixes failures with TSAN builds like
FATAL: ThreadSanitizer can not mmap the shadow memory (something is mapped at 0x55deea465000 < 0x7cf000000000)
FATAL: Make sure to compile with -fPIE and to link with -pie.
Problem: Command line editing is not tested much.
Solution: Add tests for expanding the file name and 'wildmenu'.
ae3150ec8d
The test_cmdline.vim tests were ported in 23f591dba0 and thus
should have marked 1923 as applied. The test_cmdline.vim invocation
has been moved from test_alot.vim to src/nvim/testdir/Makefile to
better accord with the upstream code.
Problem: When switching to a new buffer and an autocommand applies syntax
highlighting an ml_get error may occur.
Solution: Check "syn_buf" against the buffer in the window. (Alexander von
Buddenbrock, closesvim/vim#676)
b681be175b
Problem: When using :stopinsert in a silent mapping the "INSERT" message
isn't cleared. (Coacher)
Solution: Always clear the message. (Christian Brabandt, closesvim/vim#718)
fd773e9e88
Problem: Overwriting pointer argument.
Solution: Assign to what it points to. (Dominique Pelle)
76ae22fef3
The typos corrected in the original vim patch are no long present
in the neovim code base and the pointer assignment was done correctly
in the porting of patch 1913 (where the changes were introduced).
Problem: When setting 'filetype' there is no check for a valid name.
Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
d0b5138ba4