mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-26 14:40:30 +00:00
fix: curses backend cursor positions
This commit is contained in:
parent
b1ac297d71
commit
25a0825ae4
1 changed files with 2 additions and 2 deletions
|
@ -107,11 +107,11 @@ impl Backend for CursesBackend {
|
|||
Ok(())
|
||||
}
|
||||
fn get_cursor(&mut self) -> io::Result<(u16, u16)> {
|
||||
let (x, y) = self.curses.get_cursor_rc();
|
||||
let (y, x) = self.curses.get_cursor_rc();
|
||||
Ok((x as u16, y as u16))
|
||||
}
|
||||
fn set_cursor(&mut self, x: u16, y: u16) -> io::Result<()> {
|
||||
self.curses.move_rc(i32::from(x), i32::from(y));
|
||||
self.curses.move_rc(i32::from(y), i32::from(x));
|
||||
Ok(())
|
||||
}
|
||||
fn clear(&mut self) -> io::Result<()> {
|
||||
|
|
Loading…
Reference in a new issue