buffer: move BUFEMPTY to a function

This commit is contained in:
Thomas Vigouroux
2020-11-24 08:48:05 +01:00
parent 763c852812
commit 7970631fa0
14 changed files with 28 additions and 21 deletions

View File

@@ -1446,7 +1446,7 @@ static void read_stdin(void)
set_buflisted(true);
// Create memfile and read from stdin.
(void)open_buffer(true, NULL, 0);
if (BUFEMPTY(curbuf) && curbuf->b_next != NULL) {
if (buf_is_empty(curbuf) && curbuf->b_next != NULL) {
// stdin was empty, go to buffer 2 (e.g. "echo file1 | xargs nvim"). #8561
do_cmdline_cmd("silent! bnext");
// Delete the empty stdin buffer.