comparison src/quickfix.c @ 22870:69b48d2822ec v8.2.1982

patch 8.2.1982: quickfix window now updated when adding invalid entries Commit: https://github.com/vim/vim/commit/2ce7790348dab9cbfcc5d02c8258d0dd7ecacf95 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 14 13:15:24 2020 +0100 patch 8.2.1982: quickfix window now updated when adding invalid entries Problem: Quickfix window now updated when adding invalid entries. Solution: Update the quickfix buffer properly. (Yegappan Lakshmanan, closes #7291, closes #7271)
author Bram Moolenaar <Bram@vim.org>
date Sat, 14 Nov 2020 13:30:05 +0100
parents e82579016863
children fab8455af19c
comparison
equal deleted inserted replaced
22869:6996926dd538 22870:69b48d2822ec
4672 int prev_bufnr = -1; 4672 int prev_bufnr = -1;
4673 4673
4674 *dirname = NUL; 4674 *dirname = NUL;
4675 4675
4676 // Add one line for each error 4676 // Add one line for each error
4677 if (old_last == NULL || old_last->qf_next == NULL) 4677 if (old_last == NULL)
4678 { 4678 {
4679 qfp = qfl->qf_start; 4679 qfp = qfl->qf_start;
4680 lnum = 0; 4680 lnum = 0;
4681 } 4681 }
4682 else 4682 else
4683 { 4683 {
4684 qfp = old_last->qf_next; 4684 if (old_last->qf_next != NULL)
4685 qfp = old_last->qf_next;
4686 else
4687 qfp = old_last;
4685 lnum = buf->b_ml.ml_line_count; 4688 lnum = buf->b_ml.ml_line_count;
4686 } 4689 }
4687 4690
4688 qftf_list = call_qftf_func(qfl, qf_winid, (long)(lnum + 1), 4691 qftf_list = call_qftf_func(qfl, qf_winid, (long)(lnum + 1),
4689 (long)qfl->qf_count); 4692 (long)qfl->qf_count);