aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
Commit message (Collapse)AuthorAge
...
* vim-patch:8.2.2813: cannot grep using fuzzy matchingSean Dewar2022-02-07
| | | | | | Problem: Cannot grep using fuzzy matching. Solution: Add the "f" flag to :vimgrep. (Yegappan Lakshmanan, closes vim/vim#8152) https://github.com/vim/vim/commit/bb01a1ef3a093cdb36877ba73474719c531dc8cb
* vim-patch:8.2.3914 (#16808)dundargoc2021-12-28
| | | | | | | | | * vim-patch:8.2.3914: various spelling mistakes in comments Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pellé, closes vim/vim#9416) https://github.com/vim/vim/commit/af4a61a85d6e8cacc35324f266934bc463a21673 Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(quickfix): avoid O(N^2) when filling from string typval (#16654)Nicolas Hillegeer2021-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When filling a quickfix/loclist from a string-typed VimL variable, the complexity is O(N^2) in the number of lines in the variable. The problem is caused by using `xstrlcpy(3)` to copy the characters from the current position up to the next newline into the quickfix/loclist buffer in a loop. strlcpy(3) returns the length of `src`, so by necessity it has to compute `strlen(src)`. This means scanning the full rest of the typval on every iteration while only copying a small fraction (up to the next '\n'). This is not a problem whenever the srclen-to-copylen ratio is close to 1, which it usually is. But not in this case. Since we already calculated exactly how many bytes we want to copy, we should be using memcpy(3). This problem is not present in Vim, as it uses `vim_strncpy`, a `strncpy(3)`-alike, which stops at either `\0` or `n`, whichever comes first. The quickfix/loclist window can be filled using a: 1. File (used by commands like :grep/:make/... to source directly from their errorfile) 2. Buffer (used by :cbuffer and its variants) 3. Typval a. String (used by :cexpr and its variants) b. List of strings (used by setqflist(), setloclist(), :cepxr and its variants) This commit optimizes case (3a), especially when the typval is a long string. The pathological path is triggered by (e.g.) :grep enhancements as found in https://gist.github.com/romainl/56f0c28ef953ffc157f36cc495947ab3: function! Grep(...) return system(join([&grepprg] + a:000), ' ')) endfunction :cgetexpr Grep('foo') It would've been better for Neovim to use `systemlist` here, before this commit.
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* refactor: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* vim-patch:8.1.0779: argument for message functions is inconsistentJames McCoy2021-11-01
| | | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *". https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* refactor: uncrustify #16090dundargoc2021-10-29
|
* vim-patch:8.2.3547: opening the quickfix window triggers BufWinEnter twice ↵Yorick Peterse2021-10-23
| | | | | | | | (#16108) Problem: Opening the quickfix window triggers BufWinEnter twice. (Yorick Peterse) Solution: Only trigger BufWinEnter with "quickfix". (closes vim/vim#9022) https://github.com/vim/vim/commit/1d30fde3c989a962e0e1af4cbcf90e1ea483f1f4
* vim-patch:8.1.2243: typos in comments (#16104)dundargoc2021-10-20
| | | | | | Problem: Typos in comments. Solution: Fix the typos. (Dominique Pelle, closes vim/vim#5160) Also adjust formatting a bit. https://github.com/vim/vim/commit/32aa10203bd0b4b270def03311a4599f9ffdecc4
* refactor: reduce number of unique char castsDundar Göc2021-10-13
|
* refactor: remove redundant char casts #15888dundargoc2021-10-04
|
* refactor: format with uncrustify #15778dundargoc2021-09-25
| | | * fixup: force exactly one whitespace between type and variable
* refactor: format with uncrustify #15755dundargoc2021-09-24
|
* refactor: replace TRUE/FALSE with true/false #15647dundargoc2021-09-13
|
* vim-patch:8.2.3163: location list window may open a wrong fileJan Edmund Lazo2021-07-31
| | | | | | | Problem: Location list window may open a wrong file. Solution: Also update the qf_ptr field. (Wei-Chung Wen, closes vim/vim#8565, closes vim/vim#8566) https://github.com/vim/vim/commit/1557b16dad2b1a3466a93d015575cd7fdb4661c9
* vim-patch:8.2.3019: location list only has the start position.Jan Edmund Lazo2021-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Location list only has the start position. Solution: Make it possible to add an end position. (Shane-XB-Qian, closes vim/vim#8393) https://github.com/vim/vim/commit/6864efa59636ccede2af24e3f5f92d78d210d77b N/A patches for version.c: vim-patch:8.2.3002: Vim doesn't abort on a fatal Tcl error Problem: Vim doesn't abort on a fatal Tcl error. Solution: Change emsg() to iemsg(). (Dominique Pellé, closes vim/vim#8383) https://github.com/vim/vim/commit/affd0bc626560631f1df2e0f68db2f15dbda47e1 vim-patch:8.2.3030: Coverity reports a memory leak Problem: Coverity reports a memory leak. Solution: Fix the leak and a few typos. (Dominique Pellé, closes vim/vim#8418) https://github.com/vim/vim/commit/cb54bc65625abad9a0af501acac5c70fba17e2cc Patch v8.2.3022 is mostly N/A but cannot be included here because of new feature check for "has()". vim-patch:8.2.3032: build problems with MSVC, other crypt issues with libsodium Problem: Build problems with MSVC, other crypt issues with libsodium. Solution: Adjust MSVC makefile. Disable swap file only when 'key' is set. Adjust error message used when key is wrong. Fix Coverity issues. (Christian Brabandt, closes vim/vim#8420, closes vim/vim#8411) https://github.com/vim/vim/commit/226b28b96150e59375d2bff44e0aadd382b0c3f1 vim-patch:8.2.3044: Amiga MorphOS and AROS: process ID is not valid Problem: Amiga MorphOS and AROS: process ID is not valid. Solution: Use FindTask to return something which is unique to all processes. (Ola Söder, closes vim/vim#8444) https://github.com/vim/vim/commit/3a62b14077c51c739cdc755356882b40c299f1c0 vim-patch:8.2.3046: Amiga MorphOS: Term mode is set using DOS packets Problem: Amiga MorphOS: Term mode is set using DOS packets. Solution: Use the same way of setting term mdoe on all next gen Amiga-like systems. (Ola Söder, closes vim/vim#8445) https://github.com/vim/vim/commit/b420ac9d20d484ba0ebf3e328069251a63f96996
* Merge pull request #12971 from vigoux/decurbufBjörn Linse2021-07-09
|\ | | | | Decrease reliance on curbuf in BUFEMPTY and `undo.c`
| * fix(qf): use correct buffer fieldThomas Vigouroux2021-07-06
| |
| * undo: reduce reliance on curbufThomas Vigouroux2021-07-06
| |
* | chore: use codespell to spell check #15016dundargoc2021-07-07
|/
* vim-patch:8.2.3018: 'quickfixtextfunc' formatting is lost when switching ↵Yorick Peterse2021-06-26
| | | | | | | | | buffers (#14865) Problem: Formatting using quickfixtextfunc is lost when updating location lists for different buffers. (Yorick Peterse) Solution: Use the right window for the locaiton list. (Yegappan Lakshmanan, closes vim/vim#8400, closes vim/vim#8403) https://github.com/vim/vim/commit/ad52f96a2d3169cb1b915c1d4a6ba26ba6e5bd0a
* vim-patch:8.2.2185: BufUnload is not triggered for the quickfix dummy bufferJan Edmund Lazo2021-06-23
| | | | | | | Problem: BufUnload is not triggered for the quickfix dummy buffer. Solution: Do trigger BufUnload. (Pontus Leitzler,closes vim/vim#7518, closes vim/vim#7517) Fix white space around "=". https://github.com/vim/vim/commit/1cfb9bb5c06c07f14475f39c4eb57fea1f0dfb69
* vim-patch:8.2.1255: cannot use a lambda with quickfix functionsJan Edmund Lazo2021-06-23
| | | | | | Problem: Cannot use a lambda with quickfix functions. Solution: Add support for lambda. (Yegappan Lakshmanan, closes vim/vim#6499) https://github.com/vim/vim/commit/d43906d2e5969288f239df851f5ad7b1dc2c7251
* vim-patch:8.1.2320: insufficient test coverage for quickfixJan Edmund Lazo2021-05-21
| | | | | | | Problem: Insufficient test coverage for quickfix. Solution: Add more tests. Fix uncovered problem. (Yegappan Lakshmanan, closes vim/vim#5238) https://github.com/vim/vim/commit/f9ae154c512683ea7b933f870b0268232fd7ad38
* fixup! vim-patch:8.2.0959: using 'quickfixtextfunc' is a bit slowkevinhwang912021-05-20
|
* vim-patch:8.2.0959: using 'quickfixtextfunc' is a bit slowkevinhwang912021-05-20
| | | | | | Problem: Using 'quickfixtextfunc' is a bit slow. Solution: Process a list of entries. (Yegappan Lakshmanan, closes vim/vim#6234) https://github.com/vim/vim/commit/00e260bb6cc33ff5dbba15ac87ca7fd465aa49c0
* vim-patch:8.2.0933: 'quickfixtextfunc' does not get window ID of location listkevinhwang912021-05-20
| | | | | | | Problem: 'quickfixtextfunc' does not get window ID of location list. Solution: Add "winid" to the dict argument. (Yegappan Lakshmanan, closes vim/vim#6222) https://github.com/vim/vim/commit/7ba5a7eff335dcce25afaa154f32eeadb6014b61
* vim-patch:8.2.0869: it is not possible to customize the quickfix window contentskevinhwang912021-05-20
| | | | | | Problem: It is not possible to customize the quickfix window contents. Solution: Add 'quickfixtextfunc'. (Yegappan Lakshmanan, closes vim/vim#5465) https://github.com/vim/vim/commit/858ba06d5f577b187da0367b231f7fa9461cb32d
* vim-patch:8.2.0295: highlighting for :s wrong when using different separator ↵Ghjuvan Lacambre2021-04-04
| | | | | | | | (#14286) Problem: Highlighting for :s wrong when using different separator. Solution: Use separat argument for search direction and separator. (Rob Pilling, closes vim/vim#5665) https://github.com/vim/vim/commit/c036e87bd7001238ab7cc5d9e30e59bbf989a5fd
* Make sure window is still valid in the middle of calling :lopen (#14240)Tony Chen2021-03-29
| | | | | Make sure that oldwin is not invalid after splitting Revisit this when porting vim patch v8.1.0892 and related quickfix patches.
* eval: use char* for set_internal_string_var()Jan Edmund Lazo2021-02-07
| | | | | | "name" param was cast to (const char *). All calls to set_internal_string_var() cast from (char *) to (char_u *). Remove these useless casts.
* option: use char* for set_string_option_direct()Jan Edmund Lazo2021-02-07
| | | | | | | "name" param was cast to (const char *). All calls to set_string_option_direct() cast 1st arg from (char *) to (char_u *). Remove these useless casts.
* Merge pull request #12937 from jamessan/term-envJames McCoy2021-01-31
|\
| * Use abort() instead of assert(false) for things that should never happenJames McCoy2021-01-31
| | | | | | | | | | | | | | | | assert() is compiled out for release builds, but we don't want to continue running in these impossible situations. This also resolves the "implicit fallthrough" warnings for the asserts in switch cases.
* | vim-patch:8.2.2430: :vimgrep expands wildcards twice (#13853)Jan Edmund Lazo2021-01-31
|/ | | | | Problem: :vimgrep expands wildcards twice. Solution: Do not expand wildcards a second time. https://github.com/vim/vim/commit/f8c6a1718007432812184c28495e8d27ee6c0395
* vim-patch:8.2.0917: quickfix entries do not suport a "note" typeJan Edmund Lazo2021-01-02
| | | | | | | Problem: Quickfix entries do not suport a "note" type. Solution: Add support for "note". (partly by Yegappan Lakshmanan, closes vim/vim#5527, closes vim/vim#6216) https://github.com/vim/vim/commit/e928366de5deca359fad779a4f740db703296302
* vim-patch:8.2.0934: lhelpgrep twice in help window doesn't jump to the help ↵Jan Edmund Lazo2021-01-01
| | | | | | | | | | topic Problem: Running lhelpgrep twice in a help window doesn't jump to the help topic. Solution: Check whether any window with the location list is present. (Yegappan Lakshmanan, closes vim/vim#6215) https://github.com/vim/vim/commit/ec98e93a82379ca9289d8021aec374aa6798afef
* vim-patch:8.1.1281: cannot specify a count with :chistoryJan Edmund Lazo2021-01-01
| | | | | | | Problem: Cannot specify a count with :chistory. Solution: Add a count to :chistory and :lhistory. (Yegappan Lakshmanan, closes vim/vim#4344) https://github.com/vim/vim/commit/8ffc7c8b5f004971cb6f2bdcfbe4f7123cce717c
* vim-patch:8.1.1275: cannot navigate to errors before/after the cursorJan Edmund Lazo2021-01-01
| | | | | | | Problem: Cannot navigate to errors before/after the cursor. Solution: Add the :cbefore and :cafter commands. (Yegappan Lakshmanan, closes vim/vim#4340) https://github.com/vim/vim/commit/cf6a55c4b0cbf38b0c3fbed5ffd9a3fd0d2ede0e
* vim-patch:8.1.1261: no error for quickfix commands with negative rangeerw72021-01-01
| | | | | | | | | | | | | | | Problem: No error for quickfix commands with negative range. Solution: Add ADDR_UNSIGNED and use it for quickfix commands. Make assert_fails() show the command if the error doesn't match. https://github.com/vim/vim/commit/25190db225d63e185e77e043e694ef455b3cf304 N/A patches for version.c: vim-patch:8.2.0113: "make cmdidxs" fails Problem: "make cmdidxs" fails. Solution: Allow address for ":cquit". Add --not-a-term to avoid a delay. https://github.com/vim/vim/commit/9b24dfcb9f676e7f7a09a9062f0d05b2104a87eb
* vim-patch:8.1.1549: quickfix test failsJan Edmund Lazo2020-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Quickfix test fails. Solution: Negate result of bt_quickfix(). https://github.com/vim/vim/commit/61eeeea8e6455b1f36905c45a62ea8414f2f1dab Patch v8.1.1547 introduces the bug that is fixed by this patch. N/A patches for version.c: vim-patch:8.1.1590: popup window test fails Problem: Popup window test fails. Solution: Add "scrollbar" to expected result. https://github.com/vim/vim/commit/6c6a603cd2db9cbd51c9b4e3ff44cbab72b98592 vim-patch:8.1.1881: popup window test fails in some configurations Problem: Popup window test fails in some configurations. Solution: Check that screendumps can be made. https://github.com/vim/vim/commit/f4665e78f2d1b2ca64de5f5331d03de7d61c8c66 vim-patch:8.1.2079: popup window test fails without +terminal Problem: Popup window test fails without +terminal. Solution: Check for the +terminal feature. https://github.com/vim/vim/commit/d2c1fb476d5816db129eb428ffef6a81027eb13a vim-patch:8.1.2322: quickfix test fails in very big terminal Problem: Quickfix test fails in very big terminal. Solution: Adjust the expected result for the width. (Masato Nishihata, closes vim/vim#5244) https://github.com/vim/vim/commit/ffc4fb8fee4521a86670ae791411e319b6a2e1fd Patch v8.1.2339 reverts the change but patch v8.1.2340 restores it. Port of patch v8.1.2340 was merged and includes changes from patches v8.1.2320, v8.1.2322, v8.1.2339. vim-patch:8.2.2255: Tcl test fails Problem: Tcl test fails. Solution: Change option handling. https://github.com/vim/vim/commit/1779ff48427931736998a6e5621b5cbe4d99c3e3
* refactor: de-curwin-ify update_topline/curs_columnsMatthieu Coudron2020-12-23
|
* vim-patch:8.2.2147: quickfix window title not updated in all tab pages (#13545)Sean Dewar2020-12-17
| | | | | | Problem: Quickfix window title not updated in all tab pages. Solution: Update the quickfix window title in all tab pages. (Yegappan Lakshmanan, closes vim/vim#7481, closes vim/vim#7466) https://github.com/vim/vim/commit/530bed993e41bda6f717a8ddd0acb39464f95336
* vim-patch:8.2.2069: the quickfix window is not updated after setqflist()Jan Edmund Lazo2020-11-29
| | | | | | | | | | | | | | | Problem: The quickfix window is not updated after setqflist(). Solution: Update the quickfix buffer. (Yegappan Lakshmanan, closes vim/vim#7390, closes vim/vim#7385) https://github.com/vim/vim/commit/287153c5d481a09ffe98a95ad78390ff580bb557 N/A patches for version.c: vim-patch:8.2.2067: cursor position in popup terminal is wrong Problem: Cursor position in popup terminal is wrong. Solution: Don't check the flags. https://github.com/vim/vim/commit/f5452691ba30e33b38c5b06c51ba40b58457d5d8
* vim-patch:8.2.2036: buffer messed up if creating the quickfix window fails ↵Jan Edmund Lazo2020-11-24
| | | | | | | | (#13365) Problem: Current buffer is messed up if creating a new buffer for the quickfix window fails. Solution: Check that creating the buffer succeeds. (closes vim/vim#7352) https://github.com/vim/vim/commit/9e40c4b15ebfbc84947a3f34b1bd53e397b57f51
* vim-patch:8.2.1982: quickfix window now updated when adding invalid entriesJan Edmund Lazo2020-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Quickfix window now updated when adding invalid entries. Solution: Update the quickfix buffer properly. (Yegappan Lakshmanan, closes vim/vim#7291, closes vim/vim#7271) https://github.com/vim/vim/commit/2ce7790348dab9cbfcc5d02c8258d0dd7ecacf95 N/A patches for version.c: vim-patch:8.2.1979: "term_opencmd" option of term_start() is truncated Problem: "term_opencmd" option of term_start() is truncated. (Sergey Vlasov) Solution: Allocate the buffer to hold the command. (closes vim/vim#7284) https://github.com/vim/vim/commit/47c5ea44b975adca00eaacecee5c4108996178d9 vim-patch:8.2.1981: MinGW: parallel compilation might fail Problem: MinGW: parallel compilation might fail. Solution: Add dependencies on $(OUTDIR). (Masamichi Abe, closes vim/vim#7287) https://github.com/vim/vim/commit/8496c9eadbf4ea3bf69e2e01456831eee2bddf0a vim-patch:8.2.1985: crash when closing terminal popup with <Cmd> mapping Problem: Crash when closing terminal popup with <Cmd> mapping. Solution: Check b_term is not NULL. (closes vim/vim#7294) https://github.com/vim/vim/commit/02764713a715c55e316e2bef5c9ade2fb767ee78 vim-patch:8.2.1987: MS-Windows: Win32.mak is no longer needed Problem: MS-Windows: Win32.mak is no longer needed. Solution: Do not include Win32.mak. (Jason McHugh, closes vim/vim#7290) https://github.com/vim/vim/commit/6453cc8078af403956d0e8c1849cf5ec0aae86b2
* api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()