aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2017-01-09 12:53:06 +0100
committerJames McCoy <jamessan@jamessan.com>2017-02-04 17:55:45 -0500
commite3b92c77da0277c8d58e037e42c5b929be469284 (patch)
treebc8bb9e5a7f57d8abf494cd096976ed370dc7ffe /src/nvim/quickfix.c
parentd60d1b3232a43cbc025dbbec91535260d493d89e (diff)
downloadrneovim-e3b92c77da0277c8d58e037e42c5b929be469284.tar.gz
rneovim-e3b92c77da0277c8d58e037e42c5b929be469284.tar.bz2
rneovim-e3b92c77da0277c8d58e037e42c5b929be469284.zip
vim-patch:7.4.2023
Problem: buflist_findname_stat() may find a dummy buffer. Solution: Set the BF_DUMMY flag after loading a dummy buffer. Start finding buffers from the end of the list. NOTE: In Neovim, buflist_findname_stat() was replaced by buflist_findname_file_id() in c41535d69. https://github.com/vim/vim/commit/ea3f2e7be447a8f0c4436869620f908de5e8ef1e
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c11
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;
}
/*