Fix scrolling when nick list is visible

This commit is contained in:
Joscha 2022-07-13 11:44:44 +02:00
parent 9aed0a3cee
commit f527c46dde

View file

@ -291,10 +291,12 @@ impl EuphRoom {
crossterm_lock: &Arc<FairMutex<()>>, crossterm_lock: &Arc<FairMutex<()>>,
event: KeyEvent, event: KeyEvent,
) { ) {
let chat_size = Size { // Position of vertical line between main part and nick list
height: size.height - 2, let vsplit = size.width.saturating_sub(self.nick_list_width + 1) as i32;
..size // Position of horizontal line between status and chat
}; let hsplit = 1_i32;
let chat_size = Size::new(vsplit as u16, size.height.saturating_sub(hsplit as u16 + 1));
self.chat self.chat
.handle_navigation(terminal, chat_size, event) .handle_navigation(terminal, chat_size, event)
.await; .await;