aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c13
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) {