parent
44d180cb46
commit
d689d7e8ed
@ -9,7 +9,7 @@ pub fn exit() {
|
||||
pub fn get_terminal_size() -> (u16, u16) {
|
||||
if let Ok(buffer) = ScreenBuffer::current() {
|
||||
let size = buffer.info().unwrap().terminal_size();
|
||||
(size.width as u16, size.height as u16)
|
||||
(size.width + 1, size.height + 1).into()
|
||||
} else {
|
||||
(0, 0)
|
||||
}
|
||||
|
@ -39,8 +39,7 @@ impl ITerminal for WinApiTerminal {
|
||||
}
|
||||
|
||||
fn terminal_size(&self) -> (u16, u16) {
|
||||
let csbi = ScreenBuffer::current().unwrap();
|
||||
csbi.info().unwrap().terminal_size().into()
|
||||
get_terminal_size()
|
||||
}
|
||||
|
||||
fn scroll_up(&self, count: i16) -> Result<()> {
|
||||
|
Loading…
Reference in New Issue
Block a user