terminal: Allow undo and 'modifiable'.

Partial step towards #2637. Will crash if *all* lines are deleted.

Closes #2607
References #5431
This commit is contained in:
Justin M. Keyes
2017-02-19 03:48:20 +01:00
parent 7ea81fe443
commit fedb8443d5
4 changed files with 15 additions and 28 deletions

View File

@@ -305,14 +305,9 @@ bool undo_allowed(void)
return true;
}
/*
* Get the undolevle value for the current buffer.
*/
/// Get the 'undolevels' value for the current buffer.
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;