Redraw pager after it is cleared

Have the new is_repaint_needed() take care of updating the page rendering,
this way we trigger the expected repaints.

Fixes #7289
This commit is contained in:
Johannes Altmanninger 2020-08-26 22:34:15 +02:00
parent 81d87d1c7f
commit 9000a3b2fa
2 changed files with 2 additions and 2 deletions

View file

@ -580,7 +580,8 @@ bool pager_t::rendering_needs_update(const page_rendering_t &rendering) const {
// Common case is no pager.
if (this->empty() && rendering.screen_data.empty()) return false;
return rendering.term_width != this->available_term_width || //
return this->empty() && !rendering.screen_data.empty() || // Do update after clear().
rendering.term_width != this->available_term_width || //
rendering.term_height != this->available_term_height || //
rendering.selected_completion_idx !=
this->visual_selected_completion_index(rendering.rows, rendering.cols) || //

View file

@ -1665,7 +1665,6 @@ void reader_data_t::accept_autosuggestion(bool full, bool single, move_word_styl
// Ensure we have no pager contents.
void reader_data_t::clear_pager() {
pager.clear();
current_page_rendering = page_rendering_t();
}
void reader_data_t::select_completion_in_direction(selection_motion_t dir) {