aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/undo.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/undo.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/undo.c')
-rw-r--r--src/nvim/undo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 06dc325fea..67195235fe 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -289,7 +289,7 @@ int u_savedel(linenr_T lnum, long nlines)
int undo_allowed(void)
{
/* Don't allow changes when 'modifiable' is off. */
- if (!curbuf->b_p_ma) {
+ if (!MODIFIABLE(curbuf)) {
EMSG(_(e_modifiable));
return FALSE;
}
@@ -315,6 +315,9 @@ int undo_allowed(void)
*/
static long get_undolevel(void)
{
+ if (curbuf->terminal) {
+ return -1;
+ }
if (curbuf->b_p_ul == NO_LOCAL_UNDOLEVEL)
return p_ul;
return curbuf->b_p_ul;