From f67673de71337fe5e513e7ebffc1584e3a8562a3 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 8 Sep 2020 14:33:53 +0200 Subject: [PATCH] Repaint on pager search This was broken in 6d339df612a62992979f203235407cf283, when we removed the normal repainting logic. The pager *search* however needs to trigger a refilter, and therefore needs to trigger after every insert/removal. Fixes #7318 --- src/reader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/reader.cpp b/src/reader.cpp index d5856f8e5..4cc12599a 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -1377,6 +1377,10 @@ void reader_data_t::delete_char(bool backward) { el->erase_substring(pos, pos_end - pos); update_buff_pos(el); suppress_autosuggestion = true; + // The pager needs to be refiltered. + if (el == &this->pager.search_field_line) { + command_line_changed(el); + } } /// Insert the characters of the string into the command line buffer and print them to the screen @@ -1386,6 +1390,10 @@ void reader_data_t::insert_string(editable_line_t *el, const wcstring &str) { if (!str.empty()) { el->insert_string(str, 0, str.size()); if (el == &command_line) suppress_autosuggestion = false; + // The pager needs to be refiltered. + if (el == &this->pager.search_field_line) { + command_line_changed(el); + } } }