changeset 16026:5b29ab8415df v8.1.1018

patch 8.1.1018: window cleared when entering Terminal-Normal twice commit https://github.com/vim/vim/commit/8376c3d3216f65b93fb3bc03dbbe0c1bdf4faeff Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 19 20:50:43 2019 +0100 patch 8.1.1018: window cleared when entering Terminal-Normal twice Problem: Window cleared when entering Terminal-Normal twice. (Epheien) Solution: Don't cleanup scrollback when there is no postponed scrollback. (Christian Brabandt, closes #4126)
author Bram Moolenaar <Bram@vim.org>
date Tue, 19 Mar 2019 21:00:07 +0100
parents 1aed002ab9bc
children d9cbab38f941
files src/terminal.c src/version.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- 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,