From fedb8443d58af82f7603164395ff253b94c913ae Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 19 Feb 2017 03:48:20 +0100 Subject: terminal: Allow undo and 'modifiable'. Partial step towards #2637. Will crash if *all* lines are deleted. Closes #2607 References #5431 --- src/nvim/undo.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/nvim/undo.c') diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 8cedfcb905..82ae0e8cf5 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -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; -- cgit From e7bbd35c812d338918d1c23692c70b403205fb30 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 21 Feb 2017 15:16:48 +0100 Subject: terminal: 'scrollback' Closes #2637 --- src/nvim/undo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/undo.c') diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 82ae0e8cf5..c95a795587 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -308,8 +308,9 @@ bool undo_allowed(void) /// Get the 'undolevels' value for the current buffer. static long get_undolevel(void) { - if (curbuf->b_p_ul == NO_LOCAL_UNDOLEVEL) + if (curbuf->b_p_ul == NO_LOCAL_UNDOLEVEL) { return p_ul; + } return curbuf->b_p_ul; } -- cgit