aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.h
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-09-02 14:21:06 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-02-09 11:48:45 +0100
commit891ed14f13c3ea99d3fb985371c69f769ee7ff57 (patch)
tree6e48660879a7f88178fd082d6c555fa64bec6102 /src/nvim/buffer.h
parentf6faeea41c70015f6d9b63fecaf80d106cd2636d (diff)
downloadrneovim-891ed14f13c3ea99d3fb985371c69f769ee7ff57.tar.gz
rneovim-891ed14f13c3ea99d3fb985371c69f769ee7ff57.tar.bz2
rneovim-891ed14f13c3ea99d3fb985371c69f769ee7ff57.zip
api: add nvim_create_buf to create a new empty buffer.
Loading existing files into a buffer is non-trivial and requires a window. Creating an unnamed emtpy buffer is trivial and safe though, thus worth a special case. Change nvim_buf_set_option to use aucmd_prepbuf. This is necessary to allow some options to be set on a not yet displayed buffer, such as 'buftype' option. vim-patch:7.4.1858: Add BLN_NEW to enforce buflist_new creating new buffer
Diffstat (limited to 'src/nvim/buffer.h')
-rw-r--r--src/nvim/buffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/buffer.h b/src/nvim/buffer.h
index e61c312fb1..79bed049ea 100644
--- a/src/nvim/buffer.h
+++ b/src/nvim/buffer.h
@@ -31,7 +31,7 @@ enum bln_values {
BLN_CURBUF = 1, // May re-use curbuf for new buffer
BLN_LISTED = 2, // Put new buffer in buffer list
BLN_DUMMY = 4, // Allocating dummy buffer
- // TODO(mhinz): merge patch that introduces BLN_NEW
+ BLN_NEW = 8, // create a new buffer
BLN_NOOPT = 16, // Don't copy options to existing buffer
};