mirror of https://github.com/tstack/lnav.git
[files] fix hiding of duplicate files
This commit is contained in:
parent
6be36eda19
commit
5599c9cc80
|
@ -617,6 +617,9 @@ void rebuild_indexes()
|
|||
log_info("Hiding duplicate file: %s",
|
||||
lf->get_filename().c_str());
|
||||
lf->mark_as_duplicate();
|
||||
lnav_data.ld_log_source.find_data(lf) | [](auto ld) {
|
||||
ld->set_visibility(false);
|
||||
};
|
||||
});
|
||||
reload = true;
|
||||
}
|
||||
|
|
|
@ -216,6 +216,10 @@ public:
|
|||
this->lf_options.loo_is_visible = false;
|
||||
}
|
||||
|
||||
const logfile_open_options& get_open_options() const {
|
||||
return this->lf_options;
|
||||
}
|
||||
|
||||
void reset_state();
|
||||
|
||||
bool is_time_adjusted() const {
|
||||
|
|
|
@ -991,8 +991,10 @@ bool logfile_sub_source::insert_file(const shared_ptr<logfile> &lf)
|
|||
return false;
|
||||
}
|
||||
|
||||
this->lss_files.push_back(std::make_unique<logfile_data>(
|
||||
this->lss_files.size(), this->get_filters(), lf));
|
||||
auto ld = std::make_unique<logfile_data>(
|
||||
this->lss_files.size(), this->get_filters(), lf);
|
||||
ld->set_visibility(lf->get_open_options().loo_is_visible);
|
||||
this->lss_files.push_back(std::move(ld));
|
||||
}
|
||||
else {
|
||||
(*existing)->set_file(lf);
|
||||
|
|
|
@ -82,15 +82,15 @@ static clip_command *get_commands()
|
|||
return OSX_CMDS;
|
||||
}
|
||||
if (getenv("WAYLAND_DISPLAY") != nullptr) {
|
||||
return WAYLAND_CMDS;
|
||||
return WAYLAND_CMDS;
|
||||
}
|
||||
if (getenv("DISPLAY") != nullptr) {
|
||||
if (system("command -v xclip > /dev/null 2>&1") == 0) {
|
||||
return XCLIP_CMDS;
|
||||
}
|
||||
if (system("command -v xclip > /dev/null 2>&1") == 0) {
|
||||
return XCLIP_CMDS;
|
||||
}
|
||||
if (system("command -v xsel > /dev/null 2>&1") == 0) {
|
||||
return XSEL_CMDS;
|
||||
}
|
||||
return XSEL_CMDS;
|
||||
}
|
||||
}
|
||||
if (getenv("TMUX") != nullptr) {
|
||||
return TMUX_CMDS;
|
||||
|
|
Loading…
Reference in New Issue