summaryrefslogtreecommitdiffstats
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-04 15:05:28 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-04 15:05:28 +0200
commit25190db225d63e185e77e043e694ef455b3cf304 (patch)
tree83bd30d169a67c3196f256fe27326da26f4c9369 /src/quickfix.c
parente4f5f3aa3d597ec9188e01b004013a02bceb4026 (diff)
patch 8.1.1261: no error for quickfix commands with negative rangev8.1.1261
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.
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index e8c7829616..c11436a006 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4828,12 +4828,25 @@ cleanup:
}
/*
- * Returns the number of valid entries in the current quickfix/location list.
+ * Returns the number of entries in the current quickfix/location list.
*/
int
qf_get_size(exarg_T *eap)
{
qf_info_T *qi;
+
+ if ((qi = qf_cmd_get_stack(eap, FALSE)) == NULL)
+ return 0;
+ return qf_get_curlist(qi)->qf_count;
+}
+
+/*
+ * Returns the number of valid entries in the current quickfix/location list.
+ */
+ int
+qf_get_valid_size(exarg_T *eap)
+{
+ qf_info_T *qi;
qf_list_T *qfl;
qfline_T *qfp;
int i, sz = 0;