mirror of
https://github.com/tstack/lnav
synced 2024-11-03 23:15:38 +00:00
[filter] fix a case where top time was not maintained when a filter was applied
This commit is contained in:
parent
270d44c6b4
commit
c824b64840
@ -242,15 +242,14 @@ textview_curses::reload_data()
|
||||
if (this->tc_sub_source != nullptr) {
|
||||
this->tc_sub_source->text_update_marks(this->tc_bookmarks);
|
||||
}
|
||||
listview_curses::reload_data();
|
||||
|
||||
if (this->tc_sub_source != nullptr) {
|
||||
auto ttt = dynamic_cast<text_time_translator*>(this->tc_sub_source);
|
||||
auto* ttt = dynamic_cast<text_time_translator*>(this->tc_sub_source);
|
||||
|
||||
if (ttt != nullptr) {
|
||||
ttt->data_reloaded(this);
|
||||
}
|
||||
}
|
||||
listview_curses::reload_data();
|
||||
}
|
||||
|
||||
void
|
||||
@ -822,6 +821,13 @@ text_time_translator::data_reloaded(textview_curses* tc)
|
||||
if (tc->get_inner_height() == 0) {
|
||||
return;
|
||||
}
|
||||
if (tc->get_top() > tc->get_inner_height()) {
|
||||
if (this->ttt_top_time.tv_sec != 0) {
|
||||
this->row_for_time(this->ttt_top_time) |
|
||||
[tc](auto new_top) { tc->set_top(new_top); };
|
||||
}
|
||||
return;
|
||||
}
|
||||
this->time_for_row(tc->get_top()) | [this, tc](auto top_time) {
|
||||
if (top_time != this->ttt_top_time) {
|
||||
if (this->ttt_top_time.tv_sec != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user