| Commit message (Collapse) | Author | Age |
... | |
|\
| |
| | |
refactor: replace char_u with char 13: remove `STRLEN` part 3
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
|/
|
|
|
|
|
|
|
|
|
| |
* fix(PVS/V009): start file with special comment
* fix(PVS/V501): identical sub-expressions for comparison
* fix(PVS/V560): part of conditional expression is always true/false
* fix(PVS/V593): review expression of type A = B < C
* fix(PVS/V614): potentially uninitialized variable used
|
|
|
|
|
|
|
|
|
| |
Problem: Several lines of code are duplicated.
Solution: Move duplicated code to a function. (Yegappan Lakshmanan,
closes vim/vim#5330)
https://github.com/vim/vim/commit/f4140488c72cad4dbf5449dba099cfa7de7bbb22
Using sizeof seems better than ARRAY_SIZE for vim_snprintf().
|
|
|
|
|
|
|
|
|
| |
Problem: The find_tags() function is much too long.
Solution: Refactor the function. (Yegappan Lakshmanan, closes vim/vim#9869)
https://github.com/vim/vim/commit/2f87a99b6e9b559d51e130769e7f8377db6749f8
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
| |
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.
Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
|
|\
| |
| | |
refactor: fix clang-tidy warnings
|
| |
| |
| |
| |
| |
| |
| |
| | |
Enable and fix bugprone-misplaced-widening-cast warning.
Fix some modernize-macro-to-enum and readability-else-after-return
warnings, but don't enable them. While the warnings can be useful, they
are in general too noisy to enable.
|
|/
|
|
|
|
|
|
|
|
| |
Problem: Lambda for option that is a function may be garbage collected.
Solution: Set a reference in the funcref. (Yegappan Lakshmanan,
closes vim/vim#9330)
https://github.com/vim/vim/commit/6ae8fae8696623b527c7fb22567f6a3705b2f0dd
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(#20947)
Problem: MS-Windows: No error message if vimgrep pattern is not matching.
Solution: Give an error message. (Christian Brabandt, closes vim/vim#9245,
closes vim/vim#8762)
https://github.com/vim/vim/commit/0b226f60be5c30c32fb01fc0b6dc11286e7e2313
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
| |
Uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
See also https://github.com/neovim/neovim/pull/18563
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* refactor: readability-uppercase-literal-suffix
* refactor: readability-named-parameter
* refactor: bugprone-suspicious-string-compare
* refactor: google-readability-casting
* refactor: readability-redundant-control-flow
* refactor: bugprone-too-small-loop-variable
* refactor: readability-non-const-parameter
* refactor: readability-avoid-const-params-in-decls
* refactor: google-readability-todo
* refactor: readability-inconsistent-declaration-parameter-name
* refactor: bugprone-suspicious-missing-comma
* refactor: remove noisy or slow warnings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the call to `qf_setup_state()` in `qf_init_ext()` fails, control flow jumps
to label `qf_init_end` where a call to `qf_update_buffer()` is made with
`old_last` as a function call argument.
Prior to this patch, `old_last` would not yet have been initialized to its
default value of `NULL`, resulting in `qf_update_buffer()` attempting to compare
against its uninitialized value (quickfix.c:3882) then later forwarding it to
`qf_fill_buffer()` where the address is dereferenced and repeatedly read from/
written to for performing core qflist operations.
Depending on what the default value of `old_last` was, the results may range
from a best case scenario of neovim terminating with SIGSEGV from an attempt to
dereference an invalid pointer (quickfix.c:4056) to memory corruption if it
contained some other value that results in `qfp` being initialized from
`old_last->qf_next` (after which it is subsequently written to and read from in
a fairly arbitrary fashion).
Though extremely unlikely, it's possible for there to be security considerations
as a user can ensure that the next call to `qf_setup_state()` fails.
This patch ensures that `old_last` is NULL-assigned before control flow jumps to
`qf_init_end`.
Closes #20639.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
| |
Problem: Using freed memory when location list changed in autocmd.
Solution: Return QF_ABORT and handle it. (Yegappan Lakshmanan,
closes vim/vim#10993)
https://github.com/vim/vim/commit/6d24a51b94beb1991cddce221f90b455e2d50db7
|
|
|
|
|
|
|
|
| |
Problem: Using freed memory when using 'quickfixtextfunc' recursively.
Solution: Do not allow for recursion.
https://github.com/vim/vim/commit/d6c67629ed05aae436164eec474832daf8ba7420
Cherry-pick Test_qflist_statusmsg() from patch 8.2.4617.
|
|
|
|
|
|
|
|
|
|
| |
Problem: Not enough testing for quickfix code.
Solution: Add more tests. Fix uncovered problem. (Yegappan Lakshmanan,
closes vim/vim#9839)
https://github.com/vim/vim/commit/9c9be05b17ececb1515a2f41a4dedbf848d3d8b6
Omit Test_helpgrep_vim9_restore_cpo().
Cherry-pick test_quickfix.vim change from patch 8.2.0644.
|
|
|
|
|
|
|
| |
Problem: :helpgrep may free an option that was not allocated. (Yegappan
Lakshmanan)
Solution: Check if the value was allocated.
https://github.com/vim/vim/commit/4791fcd82565adcc60b86830e0bb6cd5b6eea0a6
|
|
|
|
|
|
|
|
|
|
| |
This was used in the past with assumption that curwin/curbuf
is "special" but this has not been true since basically forever
at this point.
Reduce NOT_VALID/CLEAR panic in options.lua . These should not
be set if an effect of the option is causing something
which by itself invokes redraw_later().
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
| |
When msgsep is used, message scrolling is emulated. To make message
output fast, inhibit emulated scrolling until the full message text
is known
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
| |
* refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|\
| |
| | |
refactor: replace char_u with char 2: electric chaaralo
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
|/
|
|
|
|
|
| |
Problem: confusing error when using :cc without error list. (Gary Johnson)
Solution: Give the "no errors" error.
https://github.com/vim/vim/commit/a5d78d1f1123d9ffccd5ba58f2d2dec44cc59e94
Cherry-pick e_quickfix -> e_no_errors rename from patch 8.2.3190.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: Compiler warnings for int to size_t conversion. (Randall W.
Morris)
Solution: Add type casts.
https://github.com/vim/vim/commit/551c1aed65817558ac1ece541c246ea585645807
Still keep it size_t, but avoid calculating multiple times.
|
|\
| |
| | |
perf(api): allow to use an arena for return values
|
| | |
|
|/
|
|
|
| |
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
https://github.com/vim/vim/commit/a4d158b3c839e96ed98ff87c7b7124ff4518c4ff
|
|
|
|
|
| |
Problem: Error from setting an option is silently ignored.
Solution: Handle option value errors better. Fix uses of N_().
https://github.com/vim/vim/commit/31e5c60a682840959cae6273ccadd9aae48c928d
|
|
|
|
|
|
|
|
| |
Problem: Vim9: 'cpo' can become empty.
Solution: Use empty_option instead of an empty string. Update quickfix
buffer after restoring 'cpo'. (closes vim/vim#7608)
https://github.com/vim/vim/commit/e5a2dc87fd9d63dfd0d9c379e363ee8b8c05b14c
Omit test as it is Vim9 script.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The option.c file is too big.
Solution: Split off the code dealing with strings. (Yegappan Lakshmanan,
closes vim/vim#4937)
https://github.com/vim/vim/commit/dac1347b4d9c1a1aef6aa73fdea08a9d1077d6ea
Cherry-pick set_string_option_direct_in_win() from patch 8.1.1405.
Cherry-pick shift_line() comment change from patch 8.1.2096.
Move 'clipboard' default parsing to didset_string_options().
Reorder option flags to put Nvim-only flags at the end.
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot use a lambda for 'operatorfunc'.
Solution: Support using a lambda or partial. (Yegappan Lakshmanan,
closes vim/vim#8775)
https://github.com/vim/vim/commit/777175b0df8c5ec3cd30d19a2e887e661ac209c8
Omit duplicate docs. It's removed in patch 8.2.3623.
Nvim doesn't seem to need callback_set() as it was omitted when patch 8.1.1437
was first ported.
|
|
|
|
|
|
| |
Problem: Some code in options.c fits better elsewhere.
Solution: Move functions from options.c to other files. (Yegappan
Lakshmanan, closes vim/vim#4889)
https://github.com/vim/vim/commit/e677df8d93772a705f40a94f3c871aee78fe4d99
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The screen.c file is much too big.
Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943)
https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964
This is an approximation vim-patch 8.1.2057. Applying the patch directly
isn't feasible since our version of screen.c has diverged too much,
however we still introduce drawscreen.c and drawline.c:
- screen.c is now a much smaller file used for low level screen functions
- drawline.c contains everything needed for win_line()
- drawscreen.c contains everything needed for update_screen()
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
|
|
| |
Problem: src/ex_cmds.c file is too big.
Solution: Move help related code to src/help.c. (Yegappan Lakshmanan,
closes vim/vim#6506)
https://github.com/vim/vim/commit/f868ba89039045b25efe83d12ca501d657e170e8
|
|
|
|
|
|
| |
Problem: Code for the argument list is spread out.
Solution: Put argument list code in arglist.c. (Yegappan Lakshmanan,
closes vim/vim#4819)
https://github.com/vim/vim/commit/4ad62155a1015751a6645aaecd94b02c94c8934b
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
| |
vim-patch:8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
|
|
|
|
|
|
| |
Problem: The "trailing characters" error can be hard to understand.
Solution: Add the trailing characters to the message.
https://github.com/vim/vim/commit/2d06bfde29bd3a62fc85823d2aa719ef943bd319
|
|
|
|
|
| |
Simplify variable declarations
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|