mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
quickfix: fix location list updates.
Fix quickfix performance optimization which prevented quickfix items from being updated when there were multiple windows with location lists but the buffer with errors only in one of the lists.
This commit is contained in:
parent
6340689582
commit
ff819d8ad7
@ -951,11 +951,17 @@ static void mark_adjust_internal(linenr_T line1, linenr_T line2,
|
|||||||
one_adjust_nodel(&(curbuf->b_visual.vi_start.lnum));
|
one_adjust_nodel(&(curbuf->b_visual.vi_start.lnum));
|
||||||
one_adjust_nodel(&(curbuf->b_visual.vi_end.lnum));
|
one_adjust_nodel(&(curbuf->b_visual.vi_end.lnum));
|
||||||
|
|
||||||
/* quickfix marks */
|
// quickfix marks
|
||||||
qf_mark_adjust(NULL, line1, line2, amount, amount_after);
|
if (!qf_mark_adjust(NULL, line1, line2, amount, amount_after)) {
|
||||||
/* location lists */
|
curbuf->b_has_qf_entry &= ~BUF_HAS_QF_ENTRY;
|
||||||
|
}
|
||||||
|
// location lists
|
||||||
|
bool found_one = false;
|
||||||
FOR_ALL_TAB_WINDOWS(tab, win) {
|
FOR_ALL_TAB_WINDOWS(tab, win) {
|
||||||
qf_mark_adjust(win, line1, line2, amount, amount_after);
|
found_one |= qf_mark_adjust(win, line1, line2, amount, amount_after);
|
||||||
|
}
|
||||||
|
if (!found_one) {
|
||||||
|
curbuf->b_has_qf_entry &= ~BUF_HAS_LL_ENTRY;
|
||||||
}
|
}
|
||||||
|
|
||||||
sign_mark_adjust(line1, line2, amount, amount_after);
|
sign_mark_adjust(line1, line2, amount, amount_after);
|
||||||
|
@ -2379,7 +2379,8 @@ static void qf_free(qf_info_T *qi, int idx)
|
|||||||
/*
|
/*
|
||||||
* qf_mark_adjust: adjust marks
|
* qf_mark_adjust: adjust marks
|
||||||
*/
|
*/
|
||||||
void qf_mark_adjust(win_T *wp, linenr_T line1, linenr_T line2, long amount, long amount_after)
|
bool qf_mark_adjust(win_T *wp, linenr_T line1, linenr_T line2, long amount,
|
||||||
|
long amount_after)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
qfline_T *qfp;
|
qfline_T *qfp;
|
||||||
@ -2389,11 +2390,12 @@ void qf_mark_adjust(win_T *wp, linenr_T line1, linenr_T line2, long amount, long
|
|||||||
int buf_has_flag = wp == NULL ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
|
int buf_has_flag = wp == NULL ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
|
||||||
|
|
||||||
if (!(curbuf->b_has_qf_entry & buf_has_flag)) {
|
if (!(curbuf->b_has_qf_entry & buf_has_flag)) {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if (wp != NULL) {
|
if (wp != NULL) {
|
||||||
if (wp->w_llist == NULL)
|
if (wp->w_llist == NULL) {
|
||||||
return;
|
return false;
|
||||||
|
}
|
||||||
qi = wp->w_llist;
|
qi = wp->w_llist;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2414,9 +2416,7 @@ void qf_mark_adjust(win_T *wp, linenr_T line1, linenr_T line2, long amount, long
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found_one) {
|
return found_one;
|
||||||
curbuf->b_has_qf_entry &= ~buf_has_flag;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user