mirror of
https://github.com/tstack/lnav
synced 2024-11-17 15:29:40 +00:00
[overlay] clear overlay when file is removed
This commit is contained in:
parent
73bde9dee3
commit
9906e949cf
@ -165,6 +165,7 @@ public:
|
||||
}
|
||||
|
||||
if (lss.text_line_count() == 0) {
|
||||
this->fos_log_helper.clear();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,13 @@ class log_data_helper
|
||||
public:
|
||||
log_data_helper(logfile_sub_source &lss) : ldh_log_source(lss) { };
|
||||
|
||||
void clear() {
|
||||
this->ldh_file = NULL;
|
||||
this->ldh_parser.reset();
|
||||
this->ldh_scanner.reset();
|
||||
this->ldh_namer.reset();
|
||||
};
|
||||
|
||||
bool parse_line(vis_line_t line, bool allow_middle = false) {
|
||||
return this->parse_line(this->ldh_log_source.at(line), allow_middle);
|
||||
}
|
||||
|
@ -536,15 +536,17 @@ bool logfile_sub_source::rebuild_index(observer *obs, bool force)
|
||||
total_lines);
|
||||
}
|
||||
|
||||
if (action_for_prev_line == logfile_filter::INCLUDE) {
|
||||
while (last_owner->ld_indexing.ld_start <=
|
||||
if (last_owner != NULL) {
|
||||
if (action_for_prev_line != logfile_filter::EXCLUDE) {
|
||||
while (last_owner->ld_indexing.ld_start <=
|
||||
last_owner->ld_indexing.ld_last) {
|
||||
this->lss_index.push_back(last_owner->ld_indexing.ld_start);
|
||||
++last_owner->ld_indexing.ld_start;
|
||||
this->lss_index.push_back(last_owner->ld_indexing.ld_start);
|
||||
++last_owner->ld_indexing.ld_start;
|
||||
}
|
||||
}
|
||||
else {
|
||||
this->lss_filtered_count += 1;
|
||||
}
|
||||
}
|
||||
else if (action_for_prev_line == logfile_filter::EXCLUDE) {
|
||||
this->lss_filtered_count += 1;
|
||||
}
|
||||
|
||||
for (iter = this->lss_files.begin();
|
||||
|
Loading…
Reference in New Issue
Block a user