| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
These are only used when running `make lintc` with ENABLE_ASAN_UBSAN
enabled, which is why it wasn't caught by CI.
|
|
|
|
|
|
|
| |
Enable all clang-tidy warnings by default instead of disabling them.
This ensures that we don't miss useful warnings on each clang-tidy
version upgrade. A drawback of this is that it will force us to either
fix or adjust the warnings as soon as possible.
|
|\
| |
| | |
refactor(sign): move legacy signs to extmarks
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: The legacy signlist data structures and associated functions are
redundant since the introduction of extmark signs.
Solution: Store signs defined through the legacy commands in a hashmap, placed
signs in the extmark tree. Replace signlist associated functions.
Usage of the legacy sign commands should yield no change in behavior with the
exception of:
- "orphaned signs" are now always removed when the line it is placed on is
deleted. This used to depend on the value of 'signcolumn'.
- It is no longer possible to place multiple signs with the same identifier
in a single group on multiple lines. This will now move the sign instead.
Moreover, both signs placed through the legacy sign commands and through
|nvim_buf_set_extmark()|:
- Will show up in both |sign-place| and |nvim_buf_get_extmarks()|.
- Are displayed by increasing sign identifier, left to right.
Extmark signs used to be ordered decreasingly as opposed to legacy signs.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: heap-use-after-free in is_qf_win()
Solution: Check buffer is valid before accessing it
https://github.com/vim/vim/commit/fc68299d436cf87453e432daa77b6d545df4d7ed
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|/ |
|
|
|
|
|
|
| |
- reduce variable scope
- prefer initialization over declaration and assignment
- use bool to represent boolean values
|
|
|
|
|
|
|
| |
We already have an extensive suite of static analysis tools we use,
which causes a fair bit of redundancy as we get duplicate warnings. PVS
is also prone to give false warnings which creates a lot of work to
identify and disable.
|
| |
|
|
|
|
| |
Move default mappings and autocommands into a separate module and add
comments and docstrings to document each of the defaults.
|
|
|
|
|
|
| |
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
|
| |
|
|
|
|
|
|
| |
connection from any channel or stdio will unblock
remote_ui_wait_for_attach. Wait on stdio only if
only —embed specified, if both —embed and
—listen then wait on any channel.
|
| |
|
|
|
|
|
|
| |
- Move vimoption_T to option.h
- option_defs.h is for option-related types
- option_vars.h corresponds to Vim's option.h
- option_defs.h and option_vars.h don't include each other
|
| |
|
|
|
|
|
| |
long is 32-bits even on 64-bit windows which makes the type suboptimal
for a codebase meant to be cross-platform.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
NVIM_APPNAME does not allow path separators in the name, so relative
paths can't be used:
NVIM_APPNAME="neovim-configs/first-config" nvim
NVIM_APPNAME="neovim-configs/second-config" nvim
Solution:
Let NVIM_APPNAME be a relative path. Absolute paths are not supported.
fix #23056
fix #24966
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Close #24180
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Using "nvim -l args.lua" without passing extra script args, does not set `_G.arg[0]`.
Steps to reproduce:
```
cat > args.lua<<EOF
vim.print(_G.arg, '')
vim.print(vim.v.argv, '')
EOF
nvim --clean -l args.lua
```
Solution:
Fix condition in command_line_scan.
|
|
|
|
|
|
|
|
|
| |
Co-authored by: zeertzjq <zeertzjq@outlook.com>
Co-authored by: Steven Todd McIntyre II <114119064+stmii@users.noreply.github.com>
Co-authored by: nobe4 <nobe4@users.noreply.github.com>
- docs: mention --luadev-mod to run with lua runtime files
When changing a lua file in the ./runtime folder, a new contributor
might expect changes to be applied to the built Neovim binary.
|
|
|
|
| |
- Use tostring() as that's what print() uses internally.
- Do not append trailing new line.
|
| |
|
|
|
|
|
|
|
|
| |
Removes the `getoption_T` struct and also introduces the `OptVal` struct
to unify the methods of getting/setting different option value types.
This is the first of many PRs to reduce code duplication in the Vim
option code as well as to make options easier to maintain. It also
increases the flexibility and extensibility of options. Which opens the
door for things like Array and Dictionary options.
|
|
|
| |
Closes https://github.com/neovim/neovim/issues/23056.
|
|\
| |
| | |
fix(windows): set stdout to binary mode for "--api-info"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: --api-info output is binary. Not setting the mode may cause
the OS to impose unexpected eof. For Windows, it scatters extra '0d0a'
words in the output.
Solution: On Windows, set stdout to binary mode for --api-info.
Fixes #20977
|
| | |
|
| |
| |
| |
| | |
Use print_stacktrace=1 for UBSAN by default.
|
|/
|
|
|
|
|
|
|
| |
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: HiPhish <hiphish@posteo.de>
Co-authored-by: Julio B <julio.bacel@gmail.com>
Co-authored-by: T727 <74924917+T-727@users.noreply.github.com>
Co-authored-by: camoz <camoz@users.noreply.github.com>
Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
|
|
|
| |
Fix #23361
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here's the headline: when run in sync mode (last argument cb=NULL),
these functions don't actually use the uv_loop_t.
An earlier version of this patch instead replaced fs_loop with
using main_loop.uv on the main thread and luv_loop() on luv worker
threads. However this made the code more complicated for no reason.
Also arbitrarily, half of these functions would attempt to handle
UV_ENOMEM by try_to_free_memory(). This would mostly happen
on windows because it needs to allocate a converted WCHAR buffer.
This should be a quite rare situation. Your system is pretty
much hosed already if you cannot allocate like 50 WCHAR:s.
Therefore, take the liberty of simply removing this fallback.
In addition, we tried to "recover" from ENOMEM in read()/readv()
this way which doesn't make any sense. The read buffer(s) are already
allocated at this point.
This would also be an issue when using these functions on a worker
thread, as try_to_free_memory() is not thread-safe. Currently
os_file_is_readable() and os_is_dir() is used by worker threads
(as part of nvim__get_runtime(), to implement require from 'rtp' in
threads).
In the end, these changes makes _all_ os/fs.c functions thread-safe,
and we thus don't need to document and maintain a thread-safe subset.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, there were three low-level delay entry points
- os_delay(ms, ignoreinput=true): sleep for ms, only break on got_int
- os_delay(ms, ignoreinput=false): sleep for ms, break on any key input
os_microdelay(us, false): equivalent, but in μs (not directly called)
- os_microdelay(us, true): sleep for μs, never break.
The implementation of the latter two both used uv_cond_timedwait()
This could have been for two reasons:
1. allow another thread to "interrupt" the wait
2. uv_cond_timedwait() has higher resolution than uv_sleep()
However we (1) never used the first, even when TUI was a thread, and
(2) nowhere in the codebase are we using μs resolution, it is always a ms
multiplied with 1000.
In addition, os_delay(ms, false) would completely block the thread for
100ms intervals and in between check for input. This is not how event handling
is done alound here.
Therefore:
Replace the implementation of os_delay(ms, false) to use
LOOP_PROCESS_EVENTS_UNTIL which does a proper epoll wait with a timeout,
instead of the 100ms timer panic.
Replace os_microdelay(us, false) with a direct wrapper of uv_sleep.
|
|
|
|
|
| |
This was needed when TUI was a thread.
lua code uses os_getenv only on the main thread.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: There is no way to get a list of swap file names.
Solution: Add the swapfilelist() function. Use it in the test script to
clean up. Remove deleting individual swap files.
https://github.com/vim/vim/commit/c216a7a21a25a701b84b79abc1ba6ab0baa3a311
vim-patch:9.0.1005: a failed test may leave a swap file behind
Problem: A failed test may leave a swap file behind.
Solution: Delete the swap file to avoid another test to fail. Use another
file name.
https://github.com/vim/vim/commit/d0f8d39d20f8d42f7451f781f7be0bcd20e06741
Cherry-pick test_window_cmd.vim changes from patch 8.2.1593.
Remove FUNC_ATTR_UNUSED from eval functions as fptr is always unused.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
Problem: :defer not tested with exceptions and ":qa!".
Solution: Test :defer works when exceptions are thrown and when ":qa!" is
used. Invoke the deferred calls on exit.
https://github.com/vim/vim/commit/58779858fb5a82a3233af5d4237a3cece88c10d4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
| |
|
|
|
|
|
| |
Makes `extern` variables accessible through ffi on Windows.
Follow-up to https://github.com/neovim/neovim/pull/15999
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Autoload script sourced twice if sourced directly.
Solution: Do not source an autoload script again. (issue vim/vim#6644)
https://github.com/vim/vim/commit/daa2f36573db3e1df7eb1fdbc3a09a2815644048
Cherry-pick ret_sid changes from patch 8.2.0149.
Use do_in_runtimepath() as that's what source_runtime() calls in Nvim.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|