aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-02-19 03:48:20 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-02-26 11:29:02 +0100
commitfedb8443d58af82f7603164395ff253b94c913ae (patch)
tree81d71e8d779926db2954e2970c237759e242625e /src/nvim/normal.c
parent7ea81fe443369382b3ec8c9cfb5a80bcbcbe40bd (diff)
downloadrneovim-fedb8443d58af82f7603164395ff253b94c913ae.tar.gz
rneovim-fedb8443d58af82f7603164395ff253b94c913ae.tar.bz2
rneovim-fedb8443d58af82f7603164395ff253b94c913ae.zip
terminal: Allow undo and 'modifiable'.
Partial step towards #2637. Will crash if *all* lines are deleted. Closes #2607 References #5431
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 756053dc73..e79939ab10 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -7435,12 +7435,10 @@ static void nv_edit(cmdarg_T *cap)
/* in Visual mode and after an operator "a" and "i" are for text objects */
else if ((cap->cmdchar == 'a' || cap->cmdchar == 'i')
- && (cap->oap->op_type != OP_NOP
- || VIsual_active
- )) {
+ && (cap->oap->op_type != OP_NOP || VIsual_active)) {
nv_object(cap);
- } else if (!curbuf->b_p_ma && !p_im) {
- /* Only give this error when 'insertmode' is off. */
+ } else if (!curbuf->b_p_ma && !p_im && !curbuf->terminal) {
+ // Only give this error when 'insertmode' is off.
EMSG(_(e_modifiable));
clearop(cap->oap);
} else if (!checkclearopq(cap->oap)) {