diff options
Diffstat (limited to 'src/nvim/quickfix.c')
| -rw-r--r-- | src/nvim/quickfix.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 4e582108c5..45982cc68a 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -3778,10 +3778,15 @@ load_dummy_buffer ( } } - /* restore curwin/curbuf and a few other things */ + // Restore curwin/curbuf and a few other things. aucmd_restbuf(&aco); - if (newbuf_to_wipe != NULL && buf_valid(newbuf_to_wipe)) - wipe_buffer(newbuf_to_wipe, FALSE); + if (newbuf_to_wipe != NULL && buf_valid(newbuf_to_wipe)) { + wipe_buffer(newbuf_to_wipe, false); + } + + // Add back the "dummy" flag, otherwise buflist_findname_file_id() + // won't skip it. + newbuf->b_flags |= BF_DUMMY; } /* |