diff --git a/src/textview_curses.cc b/src/textview_curses.cc index 83676dab..0c9714df 100644 --- a/src/textview_curses.cc +++ b/src/textview_curses.cc @@ -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(this->tc_sub_source); + auto* ttt = dynamic_cast(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) {