aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
Commit message (Collapse)AuthorAge
...
* Merge pull request #20151 from dundargoc/refactor/char_u/13bfredl2022-11-22
|\ | | | | refactor: replace char_u with char 13: remove `STRLEN` part 3
| * refactor: replace char_u with charDundar Göc2022-11-19
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | fix: pvs warnings (#21145)dundargoc2022-11-22
|/ | | | | | | | | | | * 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
* vim-patch:8.2.0260: several lines of code are duplicated (#21108)zeertzjq2022-11-19
| | | | | | | | | 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().
* vim-patch:8.2.4494: the find_tags() function is much too longzeertzjq2022-11-18
| | | | | | | | | 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>
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | 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.
* Merge pull request #20821 from dundargoc/refactor/clang-tidybfredl2022-11-08
|\ | | | | refactor: fix clang-tidy warnings
| * refactor: fix clang-tidy warningsdundargoc2022-11-06
| | | | | | | | | | | | | | | | 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.
* | vim-patch:8.2.3788: lambda for option that is a function may be freedzeertzjq2022-11-07
|/ | | | | | | | | | 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>
* vim-patch:8.2.3713: MS-Windows: no error if vimgrep pattern is not matching ↵zeertzjq2022-11-06
| | | | | | | | | | | (#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>
* build(lint): remove clint.py rules for braces #20880dundargoc2022-11-01
| | | | | 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: clang-tidy fixes to silence clangd warning (#20683)dundargoc2022-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fix(qflist): avoid read of uninitialized memory (#20709)Mahmoud Al-Qudsi2022-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* refactor: replace char_u with charDundar Göc2022-10-15
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:9.0.0286: using freed memory when location list changed in autocmdzeertzjq2022-10-13
| | | | | | | 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
* vim-patch:9.0.0260: using freed memory when using 'quickfixtextfunc' recursivelyzeertzjq2022-10-13
| | | | | | | | 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.
* vim-patch:8.2.4462: not enough testing for quickfix codezeertzjq2022-10-13
| | | | | | | | | | 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.
* vim-patch:8.2.4453: :helpgrep may free an option that was not allocatedzeertzjq2022-10-13
| | | | | | | 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
* refactor(redraw): no type argument in update_screen()bfredl2022-10-05
| | | | | | | | | | 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().
* refactor: replace char_u with charDundar Göc2022-09-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-09-10
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-09-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-09-06
| | | | Work on https://github.com/neovim/neovim/issues/459
* perf(messages): don't call ui_flush() per message line in various placesbfredl2022-09-01
| | | | | | When msgsep is used, message scrolling is emulated. To make message output fast, inhibit emulated scrolling until the full message text is known
* refactor: replace char_u with charDundar Göc2022-08-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 4 (#19987)dundargoc2022-08-30
| | | | | | | * refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-29
| | | | Work on https://github.com/neovim/neovim/issues/459
* Merge pull request #19961 from dundargoc/refactor/char_u/2bfredl2022-08-29
|\ | | | | refactor: replace char_u with char 2: electric chaaralo
| * refactor: replace char_u with charDundar Göc2022-08-27
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | vim-patch:8.2.3813: confusing error when using :cc without error list (#19978)zeertzjq2022-08-28
|/ | | | | | | 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.
* refactor: replace char_u with charDundar Göc2022-08-26
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: change FALSE/TRUE to false/trueLewis Russell2022-08-26
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: replace char_u with charDundar Goc2022-08-25
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: pre-incr to post-incrLewis Russell2022-08-25
|
* vim-patch:8.2.2826: compiler warnings for int to size_t conversionzeertzjq2022-08-25
| | | | | | | | | 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.
* Merge pull request #19906 from bfredl/bigstagebfredl2022-08-24
|\ | | | | perf(api): allow to use an arena for return values
| * perf(api): allow to use an arena for return valuesbfredl2022-08-23
| |
* | vim-patch:9.0.0206: redraw flags are not named specifically (#19913)zeertzjq2022-08-23
|/ | | | | Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen(). https://github.com/vim/vim/commit/a4d158b3c839e96ed98ff87c7b7124ff4518c4ff
* vim-patch:8.2.4753: error from setting an option is silently ignored (#19888)zeertzjq2022-08-22
| | | | | 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
* vim-patch:8.2.2289: Vim9: 'cpo' can become empty (#19887)zeertzjq2022-08-22
| | | | | | | | 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.
* vim-patch:8.1.2045: the option.c file is too big (#19854)zeertzjq2022-08-20
| | | | | | | | | | | 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.
* vim-patch:8.2.3619: cannot use a lambda for 'operatorfunc' (#19846)zeertzjq2022-08-20
| | | | | | | | | | 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.
* vim-patch:8.1.1966: some code in options.c fits better elsewhere (#19840)zeertzjq2022-08-19
| | | | | | 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
* vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | 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>
* vim-patch:8.2.1262: src/ex_cmds.c file is too big (#19811)zeertzjq2022-08-17
| | | | | | 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
* vim-patch:8.1.1869: code for the argument list is spread out (#19791)zeertzjq2022-08-16
| | | | | | 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
* refactor: replace char_u with charDundar Goc2022-08-12
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)zeertzjq2022-08-11
| | | | | | | 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
* vim-patch:8.2.1281: the "trailing characters" error can be hard to understandzeertzjq2022-08-07
| | | | | | 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
* refactor: quickfix.c (#19603)Lewis Russell2022-08-02
| | | | | Simplify variable declarations Co-authored-by: zeertzjq <zeertzjq@outlook.com>