Builditluc / wiki-tui

A simple and easy to use Wikipedia Text User Interface
https://wiki-tui.net/
MIT License
416 stars 14 forks source link

BUG: Viewport reset after link selection #193

Closed Builditluc closed 1 year ago

Builditluc commented 1 year ago

After ArticleView::on_event returns an EventResult::Consumed to the scroller, it scrolls to the important area. But because the important area is always on the top (y: 0), the scroller scrolls to the top without changing the selection.

DEBUG wiki_tui::ui::scroll - scroll::on_event: viewport before area change 'Rect { top_left: XY { x: 0, y: 233 }, bottom_right: XY { x: 199, y: 290 } }'
DEBUG wiki_tui::ui::scroll - scroll::on_event: important area 'Rect { top_left: XY { x: 0, y: 0 }, bottom_right: XY { x: 199, y: 57 } }'
DEBUG wiki_tui::ui::scroll - scroll::on_event: viewport after area change 'Rect { top_left: XY { x: 0, y: 0 }, bottom_right: XY { x: 199, y: 57 } }'