diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-03-25 22:08:14 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-03-25 22:08:14 -0300 |
commit | a6e53a3797a93fe060f807fe2e4c6361854b6c97 (patch) | |
tree | b684785ba9c769491e6ebdac8e21495cf22dbdd3 /src/nvim/undo.c | |
parent | d2d99454e63c0e6649fddd52bbd9a10d27c2e347 (diff) | |
parent | 2aa2513b8e023a0d7bd2071299f0ea59a4d4ce25 (diff) | |
download | rneovim-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.c | 5 |
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; |