| Commit message (Collapse) | Author | Age |
... | |
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
ex_cmds2.c: lint
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Also adds one exception to linter rules:
typedef struct {
kvec_t(Object) stack;
} EncodedData;
is completely valid (from the style guide point of view) code.
|
| | | | |
| | | | |
| | | | | |
This avoids gcc warnings about undefined behaviour.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It appears that used msgpack library is not able to parse back message created
by msgpack_rpc_from_object() if nesting level is too high, so log_server_msg now
cares about msgpack_unpack_next() return value. Also error message from
server_notifications_spec.lua is not readable if something is wrong (though at
least now it does not crash when parsing deeply nested structures).
log_server_msg() in the test reports
[msgpack-rpc] nvim -> client(1) [error] "parse error"
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This removes some stack overflows in new test regarding deeply nested variables.
Now in place of crashing vim_to_object/msgpack_rpc_from_object/etc it crashes
clear_tv with stack overflow.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This ought to prevent stack overflow, but I do not see this actually working:
*lua* code crashes with stack overflow when trying to deserialize msgpack from
Neovim, Neovim is fine even if nesting level is increased 100x (though test
becomes very slow); not sure how recursive function may survive this. So it
looks like there are currently only two positive effects:
1. NULL lists are returned as empty (#4596).
2. Functional tests are slightly more fast. Very slightly. Checked for Release
build for test/functional/eval tests because benchmarking of debug mode is
not very useful.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Also fixes some errors found.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Previously there was file descriptor leak, not detected by sanitizers. Now it is
file descriptor leak with a small memory leak which is detected by ASAN what
fails one of the tests (actually, “ShaDa support code leaves .tmp.z in-place
when there is error in original ShaDa and it has .tmp.a … .tmp.x”, but error is
reported at the next test because leaks are not detected until Neovim exit and
Neovim exit happens when clear()/reset() is called which happens in before_each
only).
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
One of the reasons is that O_RDONLY is zero, which makes checking whether file
is opened read- or write-only harder. It is not guaranteed that on other system
O_WRONLY will not be zero (e.g. because file can only be opened in read-write
mode).
|
| | | | |
| | | | |
| | | | |
| | | | | |
Still no busted tests. Not tested without HAVE_PREADV.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Moves low-level functions handling to os/fs.c. Adds file.c with a proxy
interface.
Target: while leaving syscalls handling is os.c (partially handled by libuv),
add buffering for reading and writing to file.c.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Quickfix code using memory after being freed. (Dominique Pelle)
Solution: Detect that the window was closed. (Hirohito Higashi)
https://github.com/vim/vim/commit/0899d698030ec076eb26352cda1ea334ab0819d9
|
| | | | |
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
https://groups.google.com/forum/#!msg/vim_dev/H3Z3ChSUh_4/beZs6KzYdBsJ
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
add tests for synIDattr() with [fg|bg|sp]#
add tests for synIDattr and various #RGB colors
synIDattr: test for ui_rgb_attached()
test: fix tests for synIDattr fg/bg/sp
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Previously, the api metadata was only accessible frow within nvim as
msgpackparse(systemlist('nvim --api-info'))[0]
|
|\ \ \ \ \
| | | | | |
| | | | | | |
doc: cleanup
|
| | | | | | |
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Problem: Can only get the directory of the current window.
Solution: Add window and tab arguments to getcwd() and haslocaldir().
(Thinca, Hirohito Higashi)
https://github.com/vim/vim/commit/c970330676eaae7ba7cd05cfa46df5a413853ef9
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This new functionality is explained in the documentation.
Also, many tests have been added to the buffer_spec.lua file
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Enable -Wconversion in ops.c
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Problem: The test script lists all functions before executing them.
Solution: Only list the function currently being executed.
https://github.com/vim/vim/commit/93bf558caef2d507ef6baf56eaf6025b63da1e34
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fix #3100.
On virtual consoles (Alt-F1, etc.), the Ctrl-Z combination was lost.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add more clint checks
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
https://neovim.io/develop/style-guide.xml#Horizontal_Whitespace
Note that this errors out for e.g.
if (has_mbyte) mb_copy_char((const char_u **)(&f), &t); \
(found in macros.h:151) or
#define ECMD_SET_HELP 0x02 /* set b_help flag of (new) buffer before
(found in ex_cmds.h:11) (note `(new) buffer`). I left this as-is because these
pieces of code are already caught by another rule (braces near if and `/*`-style
comments). Other false positives I found were:
1. `FUNC_ATTR_NONNULL_ARG(1) FUNC_ATTR_WARN_UNUSED_RESULT`: rejected by
requiring type name to start with `[a-zA-Z_]` (this makes `1` not be
incorrectly recognized as a type).
2. `#define FOO(var) (var)`: rejected by creating `cast_line`.
3. `(expr) * (expr)`: rejected by constructing regexp so that unary operators
require no spaces after them.
4. `int f(void) FUNC_ATTR_PURE`: rejected by requiring line to start with
a space.
5. `"." STR(NVIM_VERSION_PATCH) NVIM_VERSION_PRERELEASE`: not rejected, such
thing should be rare and it would be easy to get rid of the false positive by
e.g. breaking line.
Struct literals like `(MyStruct) { 4, 2 }` are not checked:
1. I am not sure whether they are under this rule at all (this is not a cast).
2. It would be hard to get rid of false positives (like the example with `if`
above, but now for *valid* `if() {}`s).
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is also not allowed by the style guide:
https://neovim.io/develop/style-guide.xml#Preprocessor_Directives.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Rejected by https://neovim.io/develop/style-guide.xml#Horizontal_Whitespace.
Note: what to do with “empty” lines is not described in the style guide, neither
it is checked.
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
This removes attribute FUNC_ATTR_NONNULL_ALL for functions without
a pointer parameter.
|
|\ \ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Processes in vim are always started in the current directory, which
causes issues when the process is a daemon and the current directory is
a mountpoint. Fix this by adding an option to set the cwd of the new
process with jobstart(). In addition, fix termopen() so that it actually
uses the cwd option from the dict (it couldn't previously set the cwd
value due to dead code).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
|