aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-03-25 22:08:14 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-03-25 22:08:14 -0300
commita6e53a3797a93fe060f807fe2e4c6361854b6c97 (patch)
treeb684785ba9c769491e6ebdac8e21495cf22dbdd3 /src/nvim/ex_cmds.c
parentd2d99454e63c0e6649fddd52bbd9a10d27c2e347 (diff)
parent2aa2513b8e023a0d7bd2071299f0ea59a4d4ce25 (diff)
downloadrneovim-a6e53a3797a93fe060f807fe2e4c6361854b6c97.tar.gz
rneovim-a6e53a3797a93fe060f807fe2e4c6361854b6c97.tar.bz2
rneovim-a6e53a3797a93fe060f807fe2e4c6361854b6c97.zip
Merge PR #2076 'Builtin terminal emulation'
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 2c674e06e6..81c7ecab5f 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -2724,7 +2724,7 @@ do_ecmd (
/* close the link to the current buffer */
u_sync(FALSE);
close_buffer(oldwin, curbuf,
- (flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD, FALSE);
+ (flags & ECMD_HIDE) || curbuf->terminal ? 0 : DOBUF_UNLOAD, FALSE);
/* Autocommands may open a new window and leave oldwin open
* which leads to crashes since the above call sets
@@ -3656,7 +3656,7 @@ void do_sub(exarg_T *eap)
if (eap->skip) /* not executing commands, only parsing */
return;
- if (!do_count && !curbuf->b_p_ma) {
+ if (!do_count && !MODIFIABLE(curbuf)) {
/* Substitution is not allowed in non-'modifiable' buffer */
EMSG(_(e_modifiable));
return;