Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Use SyncReader & InputEvent::CursorPosition for pos_raw() #10

Merged
merged 3 commits into from
Oct 18, 2019

Conversation

zrzka
Copy link
Contributor

@zrzka zrzka commented Oct 14, 2019

Changes

TODO

Once crossterm-rs/crossterm-input#9 is merged to master.

  • Replace zrzka/unix-async-events branch with master (Cargo.toml)

Test

Tested with the following code on macOS & Linux:

use crossterm_cursor::{Result, TerminalCursor};

fn main() -> Result<()> {
    let cursor = TerminalCursor::new();

    cursor.save_position()?;

    cursor.goto(30, 20)?;
    assert_eq!(cursor.pos().unwrap(), (30, 20));

    cursor.restore_position()
}

@zrzka zrzka requested a review from TimonPost as a code owner October 14, 2019 21:28
Copy link
Member

@TimonPost TimonPost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Let's approve the other one update this one and merge this one.

@zrzka
Copy link
Contributor Author

zrzka commented Oct 18, 2019

Updated the branch. Waiting for CI and merge then.

@zrzka zrzka merged commit b96407a into master Oct 18, 2019
@zrzka zrzka deleted the zrzka/update-pos-raw branch October 18, 2019 09:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cursor position swallowed by input reader
2 participants