Skip to content

Commit

Permalink
testing with crossterm-winapi-windows-sys fails at cursor relocationg…
Browse files Browse the repository at this point in the history
… and resizing
  • Loading branch information
WanderLanz committed Feb 14, 2024
1 parent 25b27bb commit 487ad8e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cursor/sys/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use windows_sys::Win32::Foundation::BOOL;
use windows_sys::Win32::System::Console::{
SetConsoleCursorInfo, SetConsoleCursorPosition, CONSOLE_CURSOR_INFO, COORD,
};

const FALSE: BOOL = 0;
const TRUE: BOOL = 1;

Expand Down Expand Up @@ -149,7 +150,7 @@ impl ScreenBufferCursor {

unsafe {
if result(SetConsoleCursorPosition(
**self.screen_buffer.handle() as _,
**self.screen_buffer.handle() as isize,
position,
))
.is_err()
Expand All @@ -168,7 +169,7 @@ impl ScreenBufferCursor {

unsafe {
if result(SetConsoleCursorInfo(
**self.screen_buffer.handle() as _,
**self.screen_buffer.handle() as isize,
&cursor_info,
))
.is_err()
Expand Down

0 comments on commit 487ad8e

Please sign in to comment.