aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
Commit message (Collapse)AuthorAge
...
* refactor: replace char_u with charDundar Goc2022-07-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: fix clang and PVS warnings (#19569)zeertzjq2022-07-29
| | | | The last commit didn't actually disable V1028 because of a typo. Fix the typo so it is actually disabled.
* vim-patch:9.0.0097: long quickfix line is truncated for :clist (#19561)zeertzjq2022-07-28
| | | | | Problem: Long quickfix line is truncated for :clist. Solution: Allocate a buffer if needed. https://github.com/vim/vim/commit/5f30e26f6946f0d0396499f91fbcfaa9d1f8acf7
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* fix(coverity): redundant assert #19059Thomas Vigouroux2022-06-28
| | | | | * fix(coverity/353303): redundant assert eap->line2 is an int32_t, it is always lower than INT_MAX. * fix(coverity/353302): redundant assert
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.1898: command modifier parsing always uses global cmdmodzeertzjq2022-06-14
| | | | | | Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently. https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
* refactor: change type of linenr_T from long to int32_tDundar Goc2022-06-10
| | | | | | | | | | | | | The size of long varies depending on architecture, in contrast to the MAXLNUM constant which sets the maximum allowable number of lines to 2^32-1. This discrepancy may lead to hard to detect bugs, for example https://github.com/neovim/neovim/issues/18454. Setting linenr_T to a fix maximum size of 2^32-1 will prevent this type of errors in the future. Also change the variables `amount` and `amount_after` to be linenr_T since they're referring to "the line number difference" between two texts.
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor!: delete insertmode (#18547)Gregory Anders2022-05-22
| | | | | | | Neovim already removed `evim` (or any similar flags). The 'insertmode' option is a weird remnant, so get rid of it. The 'insertmode' option is replaced with a script that closely emulates the option. This script is documented at :help 'insertmode'
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* fix PVS warnings (#18459)dundargoc2022-05-15
| | | | | | | | | | | | | * fix(PVS/V547): remove ifs that are always true or false * fix(PVS/V560): remove partial conditions that are always true * fix(PVS/V1044): suppress warning about loop break conditions * fix(PVS/V1063): suppress "modulo by 1 operation is meaningless" * fix(PVS/V568): suppress "operator evaluates the size of a pointer" Also mark vim-patch:8.2.4958 as ported.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-03
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-04-30
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* Merge pull request #18254 from dundargoc/refactor/remove-char_ubfredl2022-04-27
|\ | | | | refactor: replace char_u variables and functions with char
| * refactor: replace char_u variables and functions with charDundar Goc2022-04-25
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | fix: show autocmd output when F is in shortmess (#18251)Gregory Anders2022-04-25
|/ | | | | | | | | | | The default value of including F in 'shortmess' has the unfortunate side effect of hiding output from autocommands. This is a common source of confusion and often leads people to think their autocommands are not working when they are. There is a small snippet in the docs for 'shortmess' indicating that the F flag suppresses autocmd output, but it's not easy to find if you don't already know to look for it. This commit removes that behavior of the F flag to make it only suppress file info when opening a new file.
* vim-patch:8.2.2474: using freed memory when window is closed by autocommandzeertzjq2022-04-21
| | | | | | | | | | Problem: Using freed memory when window is closed by autocommand. (houyunsong) Solution: Check the window pointer is still valid. https://github.com/vim/vim/commit/2c7080bf1ceef4a7779644fd428b2386a0676794 Add missing comment from Vim patch 8.0.1420. Test fails.
* vim-patch:8.2.4750: small pieces of dead code (#18113)dundargoc2022-04-15
| | | | | | Problem: Small pieces of dead code. Solution: Remove the dead code. (Goc Dundar, closes vim/vim#10190) Rename the qftf_cb struct member to avoid confusion. https://github.com/vim/vim/commit/b836658a04ee5456deca2ee523de9efe51252da3
* vim-patch:8.2.0004: get E685 and E931 if buffer reload is interruptedzeertzjq2022-04-08
| | | | | | Problem: Get E685 and E931 if buffer reload is interrupted. Solution: Do not abort deleting a dummy buffer. (closes vim/vim#5361) https://github.com/vim/vim/commit/a6e8f888e7fc31b8ab7233509254fb2e2fe4089f
* vim-patch:8.2.4402: missing parenthesis may cause unexpected problemsBrian Leung2022-04-03
| | | | | | Problem: Missing parenthesis may cause unexpected problems. Solution: Add more parenthesis is macros. https://github.com/vim/vim/commit/ae6f1d8b14c2f63811ee83ef14e32086fb3e9b83
* vim-patch:8.2.4649: various formatting problemszeertzjq2022-03-30
| | | | | | Problem: Various formatting problems. Solution: Improve the code formatting. https://github.com/vim/vim/commit/b4ad3b0deac12674a7773311890b48fd39c6807c
* fix(PVS/V560): ignore false "conditional expression is always false" (#17830)dundargoc2022-03-24
| | | | | "'qi' points to the global variable 'ql_info' or the window local location list stack 'wp->w_llist'. The contents of these structures can be changed out-of-band by an autocmd." https://github.com/vim/vim/pull/9993#issuecomment-1076544168
* vim-patch:8.1.1693: syntax coloring and highlighting is in one big file (#17721)Lewis Russell2022-03-18
| | | | | | | | | | | Problem: Syntax coloring and highlighting is in one big file. Solution: Move the highlighting to a separate file. (Yegappan Lakshmanan, closes vim/vim#4674) https://github.com/vim/vim/commit/f9cc9f209ede9f15959e4c2351e970477c139614 Name the new file highlight_group.c instead. Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* Merge pull request #17266 from famiu/feat/ui/global-statuslinebfredl2022-03-17
|\ | | | | feat(statusline): add global statusline
| * feat: add support for global statuslineFamiu Haque2022-03-18
| | | | | | | | | | | | | | | | | | | | Ref: #9342 Adds the option to have a single global statusline for the current window at the bottom of the screen instead of a statusline at the bottom of every window. Enabled by setting `laststatus = 3`. Due to the fact that statuslines at the bottom of windows are removed when global statusline is enabled, horizontal separators are used instead to separate horizontal splits. The horizontal separator character is configurable through the`horiz` item in `'fillchars'`. Separator connector characters are also used to connect the horizontal and vertical separators together, which are also configurable through the `horizup`, `horizdown`, `vertleft`, `vertright` and `verthoriz` items in `fillchars`. The window separators are highlighted using the `WinSeparator` highlight group, which supersedes `VertSplit` and is linked to `VertSplit` by default in order to maintain backwards compatibility.
* | vim-patch:8.2.3762: if quickfix buffer is wiped out getqflist() still returns itVVKot2022-03-13
| | | | | | | | | | | | | | | | Problem: If the quickfix buffer is wiped out getqflist() still returns its number. Solution: Use zero if the buffer is no longer present. (Yegappan Lakshmanan, closes vim/vim#9306) https://github.com/vim/vim/commit/56150da6879a96db1c84c7ec4ceedeb84969f606
* | vim-patch:8.2.3759: quickfix buffer becomes hidden while still in a windowVVKot2022-03-13
| | | | | | | | | | | | | | Problem: Quickfix buffer becomes hidden while still in a window. Solution: Check if the closed window is the last window showing the quickfix buffer. (Yegappan Lakshmanan, closes vim/vim#9303, closes vim/vim#9300) https://github.com/vim/vim/commit/78a61068cf2c83e611d954a0fb413a09ad59dc07
* | vim-patch:8.1.1015: quickfix buffer shows up in list, can't get buffer numberJan Edmund Lazo2022-03-13
| | | | | | | | | | | | | | | | Problem: Quickfix buffer shows up in list, can't get buffer number. Solution: Make the quickfix buffer unlisted when the quickfix window is closed. get the quickfix buffer number with getqflist(). (Yegappan Lakshmanan, closes vim/vim#4113) https://github.com/vim/vim/commit/647e24ba3dbf7ff448aa471b1a659a18267ae056
* | vim-patch:8.1.0892: failure when closing a window when location list is in useVVKot2022-03-13
| | | | | | | | | | | | | | | | Problem: Failure when closing a window when location list is in use. Solution: Handle the situation gracefully. Make sure memory for 'switchbuf' is not freed at the wrong time. (Yegappan Lakshmanan, closes vim/vim#3928) https://github.com/vim/vim/commit/eeb1b9c7ed33c152e041a286d79bf3ed00d80e40
* | vim-patch:8.1.0877: new buffer used every time the quickfix window is openedJan Edmund Lazo2022-03-13
| | | | | | | | | | | | Problem: New buffer used every time the quickfix window is opened. Solution: Reuse the buffer. (Yegappan Lakshmanan, closes vim/vim#3902) https://github.com/vim/vim/commit/ee8188fc74a7cf9ee7acb634b2bb7a032d0cb24c
* | fix(win_split_ins): do not fail when oldwin is not validzeertzjq2022-03-13
| | | | | | | | Ref #14240
* | refactor(uncrustify): format all c filesDundar Göc2022-03-10
|/
* fix: close floating windows when calling win_close()Rom Grk2022-02-10
|
* vim-patch:8.2.4329: no support for end line number and column in 'errorformat'zeertzjq2022-02-09
| | | | | | | | Problem: No support for end line number and column in 'errorformat'. Solution: Add %e and %k. (closes vim/vim#9624) https://github.com/vim/vim/commit/e023d499378942a6c3a3855cbe461ec2cb570f63 Use "\t" to represent a Tab as it looks better.
* vim-patch:8.1.2297: the ex_vimgrep() function is too longzeertzjq2022-02-09
| | | | | | | | Problem: The ex_vimgrep() function is too long. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#5211) https://github.com/vim/vim/commit/d6a98a3a9768568b668f91a53267b36f86b84466 Including a missing change to ex_vimgrep() from patch 8.0.1831.
* 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