mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
buffer: don't rely on curbuf in BUFEMPTY
This commit is contained in:
@@ -1444,11 +1444,9 @@ static void read_stdin(void)
|
||||
no_wait_return = true;
|
||||
int save_msg_didany = msg_didany;
|
||||
set_buflisted(true);
|
||||
|
||||
// Create memfile and read from stdin.
|
||||
(void)open_buffer(true, NULL, 0);
|
||||
|
||||
if (BUFEMPTY() && curbuf->b_next != NULL) {
|
||||
if (BUFEMPTY(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.
|
||||
|
Reference in New Issue
Block a user