Mercurial > vim
comparison src/terminal.c @ 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 | f5620f490af2 |
children | e7b18ce9ea2d |
comparison
equal
deleted
inserted
replaced
16025:1aed002ab9bc | 16026:5b29ab8415df |
---|---|
2950 static void | 2950 static void |
2951 handle_postponed_scrollback(term_T *term) | 2951 handle_postponed_scrollback(term_T *term) |
2952 { | 2952 { |
2953 int i; | 2953 int i; |
2954 | 2954 |
2955 ch_log(NULL, "Moving postponed scrollback to scrollback"); | 2955 if (term->tl_scrollback_postponed.ga_len == 0) |
2956 return; | |
2957 ch_log(NULL, "Moving postponed scrollback to scrollback"); | |
2958 | |
2956 // First remove the lines that were appended before, the pushed lines go | 2959 // First remove the lines that were appended before, the pushed lines go |
2957 // above it. | 2960 // above it. |
2958 cleanup_scrollback(term); | 2961 cleanup_scrollback(term); |
2959 | 2962 |
2960 for (i = 0; i < term->tl_scrollback_postponed.ga_len; ++i) | 2963 for (i = 0; i < term->tl_scrollback_postponed.ga_len; ++i) |