aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2020-06-06 02:05:49 +0200
committerGitHub <noreply@github.com>2020-06-06 02:05:49 +0200
commit33dafc4f0f21f763dac8f6bdbd27117666f908c5 (patch)
tree179301040b52babddbe60001bc5c9b467edc310a /src/nvim/buffer.c
parentfca471d8e2573c2351151051a2d2c6eee0b2243b (diff)
parent9538a7895cb6af2312a39c4c0710ace638309914 (diff)
downloadrneovim-33dafc4f0f21f763dac8f6bdbd27117666f908c5.tar.gz
rneovim-33dafc4f0f21f763dac8f6bdbd27117666f908c5.tar.bz2
rneovim-33dafc4f0f21f763dac8f6bdbd27117666f908c5.zip
Merge pull request #12413 from janlazo/vim-8.2.0089
[RDY]vim-patch:8.0.1564,8.1.{917,1895,2018,2335},8.2.{89,491,873,892,905}
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 7c8f93163a..3ce39feda5 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -186,14 +186,17 @@ int open_buffer(
}
}
- /*
- * if there is no memfile at all, exit
- * This is OK, since there are no changes to lose.
- */
+ // If there is no memfile at all, exit.
+ // This is OK, since there are no changes to lose.
if (curbuf == NULL) {
EMSG(_("E82: Cannot allocate any buffer, exiting..."));
+
+ // Don't try to do any saving, with "curbuf" NULL almost nothing
+ // will work.
+ v_dying = 2;
getout(2);
}
+
EMSG(_("E83: Cannot allocate buffer, using other one..."));
enter_buffer(curbuf);
if (old_tw != curbuf->b_p_tw) {