Fix: boundary fix in help/dict views

This commit is contained in:
2026-02-25 23:29:11 +01:00
parent aa607a78d8
commit 6dd265067f
5 changed files with 11 additions and 3 deletions

View File

@@ -223,6 +223,7 @@ fn render_content(frame: &mut Frame, app: &App, area: Rect) {
.map(|l| wrapped_line_count(l, content_width))
.sum();
let max_scroll = total_wrapped.saturating_sub(visible_height);
app.ui.help_max_scroll.set(max_scroll);
let scroll = app.ui.help_scroll().min(max_scroll);
let mut lines = parsed.lines.clone();