diff --git a/crossterm.iml b/crossterm.iml new file mode 100644 index 0000000..7fe828a --- /dev/null +++ b/crossterm.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/common/screen/raw.rs b/src/common/screen/raw.rs index 79c3495..13a1ce5 100644 --- a/src/common/screen/raw.rs +++ b/src/common/screen/raw.rs @@ -27,7 +27,7 @@ impl RawScreen { pub fn into_raw_mode() -> io::Result<()> { #[cfg(not(target_os = "windows"))] - let mut command = unix_command::RawModeCommand::new(); + let mut command = unix_command::NoncanonicalModeCommand::new(); #[cfg(target_os = "windows")] let mut command = win_commands::RawModeCommand::new(); @@ -39,7 +39,7 @@ impl RawScreen { pub fn disable_raw_modes() -> io::Result<()> { #[cfg(not(target_os = "windows"))] - let mut command = unix_command::RawModeCommand::new(); + let mut command = unix_command::NoncanonicalModeCommand::new(); #[cfg(target_os = "windows")] let mut command = win_commands::RawModeCommand::new(); diff --git a/src/kernel/unix_kernel/terminal.rs b/src/kernel/unix_kernel/terminal.rs index 469d0ac..fa60940 100644 --- a/src/kernel/unix_kernel/terminal.rs +++ b/src/kernel/unix_kernel/terminal.rs @@ -46,8 +46,8 @@ pub fn terminal_size() -> (u16, u16) { /// Get the current cursor position. pub fn pos(stdout: &Arc) -> (u16, u16) { - let mut crossterm = Crossterm::new(); - let input = crossterm.input(&Screen::default()); + let mut crossterm = Crossterm::new(&Screen::default()); + let input = crossterm.input(); let delimiter = b'R'; let mut stdin = input.read_until_async(delimiter);