diff options
author | erw7 <erw7.github@gmail.com> | 2020-10-13 10:02:36 +0900 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-01-01 04:57:50 -0500 |
commit | 35dc6d6e876c6726089338ed0a61191315deb537 (patch) | |
tree | c329cf4100c9120b984cc276a0f537f2bb0668ee /src/nvim/quickfix.c | |
parent | a66d63f36e76ba882ccf9c7c5f5d94691449b81e (diff) | |
download | rneovim-35dc6d6e876c6726089338ed0a61191315deb537.tar.gz rneovim-35dc6d6e876c6726089338ed0a61191315deb537.tar.bz2 rneovim-35dc6d6e876c6726089338ed0a61191315deb537.zip |
vim-patch:8.1.1261: no error for quickfix commands with negative range
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
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 2780553bdc..f72a5e0020 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -4269,11 +4269,22 @@ static char_u *get_mef_name(void) return name; } -/// Returns the number of valid entries in the current quickfix/location list. +/// Returns the number of entries in the current quickfix/location list. size_t qf_get_size(exarg_T *eap) FUNC_ATTR_NONNULL_ALL { qf_info_T *qi; + + if ((qi = qf_cmd_get_stack(eap, false)) == NULL) { + return 0; + } + return (size_t)qf_get_curlist(qi)->qf_count; +} + +/// Returns the number of valid entries in the current quickfix/location list. +size_t qf_get_valid_size(exarg_T *eap) +{ + qf_info_T *qi; qf_list_T *qfl; if ((qi = qf_cmd_get_stack(eap, false)) == NULL) { |