Skip to content

Commit 287d193

Browse files
committed
[filter-ui] fix history crash
Related to #1614
1 parent 09a5bca commit 287d193

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/filter_sub_source.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,15 @@ filter_sub_source::rl_history(textinput_curses& tc)
447447
case text_format_t::TF_PCRE: {
448448
std::vector<attr_line_t> poss;
449449
this->fss_regexp_history.query_entries(
450-
tc.get_content(),
451-
[&poss](const auto& e) { poss.emplace_back(e.e_content); });
450+
tc.get_content(), [&poss, &tc](const auto& e) {
451+
auto al
452+
= attr_line_t::from_table_cell_content(e.e_content,
453+
tc.get_width())
454+
.highlight_fuzzy_matches(tc.get_content())
455+
.with_attr_for_all(
456+
lnav::prompt::SUBST_TEXT.value(e.e_content));
457+
poss.emplace_back(al);
458+
});
452459
tc.open_popup_for_history(poss);
453460
break;
454461
}

0 commit comments

Comments
 (0)