diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-11-21 01:53:12 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-11-21 01:53:12 +0100 |
commit | 9b6bf8fa3728aaa39d0e8694a720da783d141ff7 (patch) | |
tree | 42a8d6407a60facf02b00128c3f929eddc75cc1c /src/nvim/mark.c | |
parent | 84d9245c70c2c65668e0b56beee7f4dcd8ea3644 (diff) | |
parent | ff819d8ad72b6a7404d28707f1f9ef460c35c472 (diff) | |
download | rneovim-9b6bf8fa3728aaa39d0e8694a720da783d141ff7.tar.gz rneovim-9b6bf8fa3728aaa39d0e8694a720da783d141ff7.tar.bz2 rneovim-9b6bf8fa3728aaa39d0e8694a720da783d141ff7.zip |
Merge #7345 'location-list update on buffer-modified'
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r-- | src/nvim/mark.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c index 7889fabd45..1ba400972c 100644 --- a/src/nvim/mark.c +++ b/src/nvim/mark.c @@ -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_end.lnum)); - /* quickfix marks */ - qf_mark_adjust(NULL, line1, line2, amount, amount_after); - /* location lists */ + // quickfix marks + if (!qf_mark_adjust(NULL, line1, line2, amount, amount_after)) { + curbuf->b_has_qf_entry &= ~BUF_HAS_QF_ENTRY; + } + // location lists + bool found_one = false; 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); |