@@ -1072,37 +1072,41 @@ field_overlay_source::list_static_overlay(const listview_curses& lv,
10721072
10731073std::optional<attr_line_t >
10741074field_overlay_source::list_header_for_overlay (const listview_curses& lv,
1075+ media_t media,
10751076 vis_line_t vl)
10761077{
10771078 attr_line_t retval;
10781079
10791080 retval.append (this ->fos_lss .get_filename_offset (), ' ' );
10801081 if (this ->fos_contexts .top ().c_show ) {
1081- retval
1082- .appendf (FMT_STRING (" \u258C Line {:L} parser details. "
1083- " Press " ),
1084- (int ) vl)
1085- .append (" p" _hotkey)
1086- .append (" to hide this panel." );
1082+ retval.appendf (FMT_STRING (" \u258C Line {:L} parser details." ),
1083+ (int ) vl);
1084+ if (media == media_t ::display) {
1085+ retval.append (" Press " )
1086+ .append (" p" _hotkey)
1087+ .append (" to hide this panel." );
1088+ }
10871089 } else {
10881090 retval.append (" \u258C Line " )
10891091 .append (
10901092 lnav::roles::number (fmt::format (FMT_STRING (" {:L}" ), (int ) vl)))
10911093 .append (" metadata" );
10921094 }
10931095
1094- if (lv.get_overlay_selection ()) {
1095- retval.append (" " )
1096- .append (" SPC" _hotkey)
1097- .append (" : hide/show field " )
1098- .append (" c" _hotkey)
1099- .append (" : copy field value " )
1100- .append (" Esc" _hotkey)
1101- .append (" : exit this panel" );
1102- } else {
1103- retval.append (" Press " )
1104- .append (" CTRL-]" _hotkey)
1105- .append (" to focus on this panel" );
1096+ if (media == media_t ::display) {
1097+ if (lv.get_overlay_selection ()) {
1098+ retval.append (" " )
1099+ .append (" SPC" _hotkey)
1100+ .append (" : hide/show field " )
1101+ .append (" c" _hotkey)
1102+ .append (" : copy field value " )
1103+ .append (" Esc" _hotkey)
1104+ .append (" : exit this panel" );
1105+ } else {
1106+ retval.append (" Press " )
1107+ .append (" CTRL-]" _hotkey)
1108+ .append (" to focus on this panel" );
1109+ }
11061110 }
11071111
11081112 return retval;
0 commit comments