diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-02-09 15:01:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-09 15:01:06 +0100 |
commit | 3ff1228f785705a46a0bd24fb5dc2bf76b6dad68 (patch) | |
tree | 508ff31d36dd2261ada88cdc9a126ca51438cd1a /src/nvim/buffer.c | |
parent | c9d01ff7db7b3ae7ecfcedbeae3e605996f4e214 (diff) | |
parent | 891ed14f13c3ea99d3fb985371c69f769ee7ff57 (diff) | |
download | rneovim-3ff1228f785705a46a0bd24fb5dc2bf76b6dad68.tar.gz rneovim-3ff1228f785705a46a0bd24fb5dc2bf76b6dad68.tar.bz2 rneovim-3ff1228f785705a46a0bd24fb5dc2bf76b6dad68.zip |
Merge pull request #9272 from bfredl/createbuf
api: add nvim_create_buf to create a new empty buffer.
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 802eba06a5..7fd4326914 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1629,7 +1629,7 @@ buf_T * buflist_new(char_u *ffname, char_u *sfname, linenr_T lnum, int flags) FileID file_id; bool file_id_valid = (sfname != NULL && os_fileid((char *)sfname, &file_id)); - if (ffname != NULL && !(flags & BLN_DUMMY) + if (ffname != NULL && !(flags & (BLN_DUMMY | BLN_NEW)) && (buf = buflist_findname_file_id(ffname, &file_id, file_id_valid)) != NULL) { xfree(ffname); |