diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-20 07:49:45 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-20 09:27:34 -0300 |
commit | c65f18f686e31fd5c35bf5017e377950202b9a31 (patch) | |
tree | 152ed4765c9e30e2cc775ee0c950c0e065632523 /src | |
parent | 1ed7ae6260e8bf24ca943b03dca524c78a257854 (diff) | |
download | rneovim-c65f18f686e31fd5c35bf5017e377950202b9a31.tar.gz rneovim-c65f18f686e31fd5c35bf5017e377950202b9a31.tar.bz2 rneovim-c65f18f686e31fd5c35bf5017e377950202b9a31.zip |
tui: Set default color attributes when scrolling
This is necessary for some terminals, or else they will clear/insert lines with
wrong background color
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/tui/tui.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index b626b54671..5951408c42 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -412,6 +412,11 @@ static void tui_scroll(UI *ui, int count) data->params[1].i = bot; unibi_out(ui, unibi_change_scroll_region); unibi_goto(ui, top, left); + // also set default color attributes or some terminals can become funny + HlAttrs clear_attrs = EMPTY_ATTRS; + clear_attrs.foreground = data->fg; + clear_attrs.background = data->bg; + update_attrs(ui, clear_attrs); } // Compute start/stop/step for the loop below, also use terminal scroll |