Make scrollback display stable with typing_notice_display = false (#469)
This commit is contained in:
@@ -1361,7 +1361,9 @@ impl RoomInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !settings.tunables.typing_notice_display {
|
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);
|
let top = Rect::new(area.x, area.y, area.width, area.height - 1);
|
||||||
|
|||||||
@@ -1571,7 +1571,7 @@ mod tests {
|
|||||||
// MSG1: | XXXday, Month NN 20XX |
|
// MSG1: | XXXday, Month NN 20XX |
|
||||||
// | @user1:example.com writhe |
|
// | @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);
|
let mut buffer = Buffer::empty(area);
|
||||||
scrollback.draw(area, &mut buffer, true, &mut store);
|
scrollback.draw(area, &mut buffer, true, &mut store);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user