summaryrefslogtreecommitdiffstats
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-14 13:15:24 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-14 13:15:24 +0100
commit2ce7790348dab9cbfcc5d02c8258d0dd7ecacf95 (patch)
tree5be6cfa06851d67bf83d3250885adcc7ba92bb01 /src/quickfix.c
parent8496c9eadbf4ea3bf69e2e01456831eee2bddf0a (diff)
patch 8.2.1982: quickfix window now updated when adding invalid entriesv8.2.1982
Problem: Quickfix window now updated when adding invalid entries. Solution: Update the quickfix buffer properly. (Yegappan Lakshmanan, closes #7291, closes #7271)
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index ac95ace493..40897b6b60 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4674,14 +4674,17 @@ qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last, int qf_winid)
*dirname = NUL;
// Add one line for each error
- if (old_last == NULL || old_last->qf_next == NULL)
+ if (old_last == NULL)
{
qfp = qfl->qf_start;
lnum = 0;
}
else
{
- qfp = old_last->qf_next;
+ if (old_last->qf_next != NULL)
+ qfp = old_last->qf_next;
+ else
+ qfp = old_last;
lnum = buf->b_ml.ml_line_count;
}