Skip to content

Commit c93ce7f

Browse files
committed
[overlay] mention filtering of unmarked messages
1 parent b35d0a6 commit c93ce7f

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

src/field_overlay_source.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ field_overlay_source::lss_state::from(logfile_sub_source& lss)
773773
lss.get_min_row_time(),
774774
lss.get_max_row_time(),
775775
lss.get_min_log_level(),
776+
lss.get_marked_only(),
776777
};
777778
}
778779

@@ -826,6 +827,13 @@ field_overlay_source::list_static_overlay(const listview_curses& lv,
826827
.append(lnav::roles::number(fmt::to_string(hits)))
827828
.append(" message(s) "));
828829
}
830+
if (curr_state.ls_marked_only) {
831+
msg.with_note(attr_line_t("The ")
832+
.append_quoted(lnav::roles::keyword(
833+
":hide-unmarked-lines"))
834+
.append(" command was used and no "
835+
"unfiltered lines are marked"));
836+
}
829837
this->fos_static_lines = msg.to_attr_line().split_lines();
830838
this->fos_static_lines_state = curr_state;
831839
}

src/field_overlay_source.hh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,15 @@ public:
106106
std::optional<timeval> ls_min_time;
107107
std::optional<timeval> ls_max_time;
108108
log_level_t ls_min_level{log_level_t::LEVEL_UNKNOWN};
109+
bool ls_marked_only{false};
109110

110111
friend bool operator==(const lss_state& lhs, const lss_state& rhs)
111112
{
112113
return lhs.ls_filter_generation == rhs.ls_filter_generation
113114
&& lhs.ls_min_time == rhs.ls_min_time
114115
&& lhs.ls_max_time == rhs.ls_max_time
115-
&& lhs.ls_min_level == rhs.ls_min_level;
116+
&& lhs.ls_min_level == rhs.ls_min_level
117+
&& lhs.ls_marked_only == rhs.ls_marked_only;
116118
}
117119

118120
friend bool operator!=(const lss_state& lhs, const lss_state& rhs)

0 commit comments

Comments
 (0)