Revert "Prefer using clr_eos to clear "remaining lines""

This reverts commit d502ad2c25.

Fixes #6263
This commit is contained in:
Fabian Homborg 2019-10-31 19:15:03 +01:00
parent c2dbe36e4a
commit ec4bbe248e

View file

@ -645,7 +645,6 @@ static void s_update(screen_t *scr, const wcstring &left_prompt, const wcstring
// Determine how many lines have stuff on them; we need to clear lines with stuff that we don't // Determine how many lines have stuff on them; we need to clear lines with stuff that we don't
// want. // want.
const size_t lines_with_stuff = std::max(actual_lines_before_reset, scr->actual.line_count()); const size_t lines_with_stuff = std::max(actual_lines_before_reset, scr->actual.line_count());
if (scr->desired.line_count() < lines_with_stuff) need_clear_screen = true;
if (left_prompt != scr->actual_left_prompt) { if (left_prompt != scr->actual_left_prompt) {
s_move(scr, 0, 0); s_move(scr, 0, 0);
@ -795,7 +794,7 @@ static void s_update(screen_t *scr, const wcstring &left_prompt, const wcstring
} }
// Clear remaining lines (if any) if we haven't cleared the screen. // Clear remaining lines (if any) if we haven't cleared the screen.
if (!has_cleared_screen && need_clear_screen && clr_eol) { if (!has_cleared_screen && scr->desired.line_count() < lines_with_stuff && clr_eol) {
s_set_color(scr, vars, highlight_spec_t{}); s_set_color(scr, vars, highlight_spec_t{});
for (size_t i = scr->desired.line_count(); i < lines_with_stuff; i++) { for (size_t i = scr->desired.line_count(); i < lines_with_stuff; i++) {
s_move(scr, 0, (int)i); s_move(scr, 0, (int)i);