mirror of
https://github.com/neovim/neovim.git
synced 2025-09-21 10:48:18 +00:00
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
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user