diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-11-24 09:53:09 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-11-24 09:53:09 +0100 |
commit | 0b93bab6c22edf7a07cf965ebbbf631b93e1dc1b (patch) | |
tree | ecd2518228b1bbb7f3bde517be32a2d3a3ded2cb /src | |
parent | b838ad5b7a2cfeb72a34a534eb4f10787c4c6c8f (diff) | |
download | rneovim-0b93bab6c22edf7a07cf965ebbbf631b93e1dc1b.tar.gz rneovim-0b93bab6c22edf7a07cf965ebbbf631b93e1dc1b.tar.bz2 rneovim-0b93bab6c22edf7a07cf965ebbbf631b93e1dc1b.zip |
tui: update cleared area only if non-default bg
This check was removed in 133ae5eeeff3 without explanation.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/tui/tui.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 302354e826..c2e597c36c 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -940,9 +940,10 @@ static void tui_scroll(UI *ui, Integer count) } cursor_goto(ui, saved_row, saved_col); - if (!scroll_clears_to_current_colour) { - // This is required because scrolling will leave wrong background in the - // cleared area on non-bge terminals. + if (!scroll_clears_to_current_colour && grid->bg != -1) { + // Scrolling may leave wrong background in the cleared area on non-bge + // terminals. Update the cleared area of the terminal if its builtin + // scrolling facility was used and bg color is not the default. clear_region(ui, clear_top, clear_bot, grid->left, grid->right); } } else { |