summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-19 20:50:43 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-19 20:50:43 +0100
commit8376c3d3216f65b93fb3bc03dbbe0c1bdf4faeff (patch)
treefd514fbb612e269b4e64aa61e3224e9aa38b1b71
parent493fbe4abee660d30b4f2aef87b754b0a720213c (diff)
downloadvim-git-8376c3d3216f65b93fb3bc03dbbe0c1bdf4faeff.tar.gz
patch 8.1.1018: window cleared when entering Terminal-Normal twicev8.1.1018
Problem: Window cleared when entering Terminal-Normal twice. (Epheien) Solution: Don't cleanup scrollback when there is no postponed scrollback. (Christian Brabandt, closes #4126)
-rw-r--r--src/terminal.c5
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/terminal.c b/src/terminal.c
index 8d05a188e..6b167792f 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -2952,7 +2952,10 @@ handle_postponed_scrollback(term_T *term)
{
int i;
-ch_log(NULL, "Moving postponed scrollback to scrollback");
+ if (term->tl_scrollback_postponed.ga_len == 0)
+ return;
+ ch_log(NULL, "Moving postponed scrollback to scrollback");
+
// First remove the lines that were appended before, the pushed lines go
// above it.
cleanup_scrollback(term);
diff --git a/src/version.c b/src/version.c
index a49f6fb0c..18daa0696 100644
--- a/src/version.c
+++ b/src/version.c
@@ -780,6 +780,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1018,
+/**/
1017,
/**/
1016,