`_FORTIFY_SOURCE` on Ubuntu caught this, resulting in:
[OLDTEST] Running test_rename
Failed: test_rename :: Nvim exited with non-zero code
Job exited with code 134
Screen (23 lines)
================================================================================
"test_rename.vim" "test_rename.vim" 120L, 3623B
Executing Test_rename_copy()
Executing Test_rename_dir_to_dir()
Executing Test_rename_fails()
Error detected while processing command line..script /<<BUILDDIR>>/neovim-0.9.5/test/old/testdir/runtest.vim[437]..function RunTheTest[44]..Test_rename_fails:
line 17:
E730: using List as a String
line 18:
E976: using Blob as a String
Executing Test_rename_file_ignore_case()*** buffer overflow detected ***: terminated
`snprintf`'s second parameter should be no greater than the number of
remaining bytes in the allocated object. We can see that this was off
by one, because in the simple case where `tail == tempname` (for a file
in the current directory), `rename_with_tmp` was passing `MAXPATHL + 2`
for an object allocated with a size of only `MAXPATHL + 1`.
Introduced in 5f1a153831.
Setting the label `ci:skip-news` will skip the job. This is useful for
maintainers to indicate to contributors that a feature isn't big enough
to warrant a news entry, or for contributors who dislike red CI even if
there's nothing wrong.
Also change label `ci-s390x` to `ci:s390x`; this way it'll be easier to
see that `ci:` are a subcategory of labels that affect CI in some way.
Just some basic spring cleaning.
In the distant past, not all UI:s where remote UI:s. They still aren't,
but both of the "UI" and "UIData" structs are now only for remote UI:s.
Thus join them as "RemoteUI".
Problem: Various warnings from clang on MS-Windows.
Solution: Avoid the warnings. (Yegappan Lakshmanan, closesvim/vim#10553)
a34b4460c2
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
On exit, pty_process_close() may be called after pty_process_finish1()
but before start_wait_eof_timer(), in which case the timer shouldn't be
started because pty_process_close() has already closed it.
Problem: 'shortmess' "F" flag doesn't work properly with 'autoread'
(after 9.1.0154)
Solution: Hide the file info message instead of the warning dialog
(zeertzjq)
closes: vim/vim#14159closes: vim/vim#141588a01744c56
Problem: Duplicate assignment in f_getregion().
Solution: Remove the duplicate assignment. Also improve getregion()
docs wording and fix an unrelated typo (zeertzjq)
closes: vim/vim#141540df8f93bda
Before, we needed to always pack an entire msgpack_rpc Object to
a continous memory buffer before sending it out to a channel.
But this is generally wasteful. it is better to just flush
whatever is in the buffer and then continue packing to a new buffer.
This is also done for the UI event packer where there are some extra logic
to "finish" of an existing batch of nevents/ncalls. This doesn't really
stop us from flushing the buffer, just that we need to update the state
machine accordingly so the next call to prepare_call() always will
start with a new event (even though the buffer might contain overflow
data from a large event).
Problem: can only call getregion() for current buffer
Solution: Allow to retrieve selections from different buffers
(Shougo Matsushita)
closes: vim/vim#1413184bf6e658d
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
runtime(c): Recognize "__inline" (vim/vim#14145)
`__inline` is recognized by GCC, and may even be preferred, as MSVC does
not recognize `__inline__`.
63c39e4ef7
Co-authored-by: Wu Yongwei <wuyongwei@gmail.com>
runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups (vim/vim#14137)
* runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups
- Remove contained :syntax and :highlight sub-groups from the function
body cluster. These should only match in the respective commands.
- Remove vimSynLine syntax group from several clusters. The definition
of vimSynLine was removed in Vim 5.3.
* runtime(vim): Update syntax generator, use standard Last Change date format
The de facto standard date format is YYYY MMM DD.
e5c9ba6015
Co-authored-by: dkearns <dougkearns@gmail.com>
runtime(mswin): Use unnamed register when clipboard not working (vim/vim#13813)
* Use unnamed register while clipboard not exist
* Do not need to specify the unnamed register explicitly
fixes: vim/vim#13809d9ebd46bd0
Co-authored-by: Shixian Li <34830785+znsoooo@users.noreply.github.com>
runtime(sh): Update syntax file, fix issue vim/vim#962 (vim/vim#14138)
Allow the opening parenthesis of a multiline array assignment, within an
if statement, to appear at EOL.
Fixes issue vim/vim#962.
1bdc9435c1
Co-authored-by: dkearns <dougkearns@gmail.com>
Problem: null pointer member access in ui_client_start_server if
channel_job_start returns NULL.
Solution: check for it, return 0 in that case (which is already used to indicate
failure and is handled by main).
Happened on Linux when trying to run Nvim in an old gdbserver instance after having
rebuilt Nvim since. This gave E903 (the nvim binary was deleted, so " (deleted)" appears
as a suffix in the `v:progpath`, making it invalid), then ASAN complains due to the NPD;
instead it now then prints "Failed to start Nvim server!", as expected.
runtime(vim): Update base-syntax, fix issue vim/vim#14135 (vim/vim#14136)
Fix incorrect error highlighting for function calls in :command
definitions. vimFunctionError should be restricted to :function header
lines.
fixes: vim/vim#14135691aee8b07
Co-authored-by: dkearns <dougkearns@gmail.com>
runtime(vim): Update base-syntax, improve :augroup highlighting (vim/vim#14125)
- Explicitly match the bang and group name in :aug! {name}.
- Allow any characters in a group name.
- Match default group switch marker, END.
- Match :aug without arguments (list command).
c4aef9a97b
Co-authored-by: dkearns <dougkearns@gmail.com>
runtime(java): Recognise text blocks (vim/vim#14128)
Also, accept as valid the space escape sequence `\s`.
Also, consistently use the claimed `javaDebug` prefix for
syntax group definitions kept under `g:java_highlight_debug`.
Since `javaStringError` is commented out for its generality,
let's comment out `javaDebugStringError`, its copy, as well.
References:
https://openjdk.org/jeps/378https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.7Closesvim/vim#10910.
b3030b653b
Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Xcode does not allow having multiple targets depend on a custom command.
This limitation severely hinders its usability and complying with it
would likely require extensive refactoring and boilerplate. It makes
more sense to simply refer users to use "Ninja" or "Unix Makefiles"
instead.
runtime(r,rhelp,rmd,rnoweb,rrst): Update ftplugin, browsefilter labels (vim/vim#14126)
Use the standard format for browsefilter labels:
"File Description (*.ext1, *.ext2, *.ext3)"
e93afc2e61
Co-authored-by: dkearns <dougkearns@gmail.com>
Problem: Text is not redrawn with 'relativenumber' when only the 'statuscolumn' is redrawn after inserted lines.
Solution: Force a full redraw if statuscolumn width changed.
Problem:
`vim.lsp.util.rename()` deletes the buffers that are affected by
renaming. This has undesireable side effects. For example, when renaming
a directory, all buffers under that directory are deleted and windows
displaying those buffers are closed. Also, buffer options may change
after renaming.
Solution:
Rename the buffers with :saveas.
An alternative approach is to record all the relevant states and restore
it after renaming, but that seems to be more complex. In fact, the older
version was attempting to restore the states but only partially and
incorrectly.
Context:
Nvim catches errors from the user's `on_exit` and rpc handler callbacks
and prints the error message.
Problem:
Printing the error message uses Nvim api functions. But callbacks
mentioned above run in `:h lua-loop-callbacks` where most of `vim.api`
is not allowed, so Nvim itself raises error.
Solution:
`vim.schedule()` the error reporting when necessary.