Make scrollback display stable with typing_notice_display = false (#469)

This commit is contained in:
VAWVAW 2025-06-21 17:43:26 +00:00 committed by GitHub
parent d1b03880f3
commit 2e6c711644
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -1361,7 +1361,9 @@ impl RoomInfo {
}
if !settings.tunables.typing_notice_display {
return area;
// still keep one line blank, so `render_jump_to_recent` doesn't immediately hide the
// last line in scrollback
return Rect::new(area.x, area.y, area.width, area.height - 1);
}
let top = Rect::new(area.x, area.y, area.width, area.height - 1);

View file

@ -1571,7 +1571,7 @@ mod tests {
// MSG1: | XXXday, Month NN 20XX |
// | @user1:example.com writhe |
// |------------------------------------------------------------|
let area = Rect::new(0, 0, 60, 4);
let area = Rect::new(0, 0, 60, 5);
let mut buffer = Buffer::empty(area);
scrollback.draw(area, &mut buffer, true, &mut store);