summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-11-11 22:18:21 +0100
committerBram Moolenaar <Bram@vim.org>2018-11-11 22:18:21 +0100
commitf3aea59afa23304266dfd0dd26b5d8cc70a21331 (patch)
treeece744179705b1a62c5ac35202c32e8559f61d3b /src/terminal.c
parent883ba68cda05cac668a493ce5115332e1b5fdc29 (diff)
downloadvim-git-f3aea59afa23304266dfd0dd26b5d8cc70a21331.tar.gz
patch 8.1.0522: :terminal does not show trailing empty linesv8.1.0522
Problem: :terminal does not show trailing empty lines. Solution: Add empty lines. (Hirohito Higashi, closes #3605)
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c
index 6927d6902..53b6ca8a2 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -1592,6 +1592,15 @@ update_snapshot(term_T *term)
}
}
+ // Add trailing empty lines.
+ for (pos.row = term->tl_scrollback.ga_len;
+ pos.row < term->tl_scrollback_scrolled + term->tl_cursor_pos.row;
+ ++pos.row)
+ {
+ if (add_empty_scrollback(term, &fill_attr, 0) == OK)
+ add_scrollback_line_to_buffer(term, (char_u *)"", 0);
+ }
+
term->tl_dirty_snapshot = FALSE;
#ifdef FEAT_TIMERS
term->tl_timer_set = FALSE;