Giter VIP home page Giter VIP logo

Comments (9)

TimonPost avatar TimonPost commented on July 24, 2024 1

Thanis for letting me know I'll be one it...

from crossterm.

TimonPost avatar TimonPost commented on July 24, 2024 1

I have the same problem though, so it is not a problem you only have. One thing to note is that when using git bash on windows the output was correct. However, when using cmd I had the same problems.

from crossterm.

TimonPost avatar TimonPost commented on July 24, 2024 1

Oke, I solved part of the problem. However I need to do some more work to make it work correctly. I would suggest to use the std::io::Stdin::read_line() instead of crossterm readline. I will be working on this and have the fixes released a soon as possible.

from crossterm.

GarkGarcia avatar GarkGarcia commented on July 24, 2024

If you are not able to replicate this issues (it may be localized thing) let me know and I'll send you some screen recordings.

from crossterm.

TimonPost avatar TimonPost commented on July 24, 2024

@GarkGarcia Did you enable with crossterm raw modes for your terminal? And could you provide some code that reproduces this?

from crossterm.

GarkGarcia avatar GarkGarcia commented on July 24, 2024

Sure, here's my code:

extern crate crossterm;

use crossterm::{terminal::{terminal, Terminal}, input};

fn main() {
    let prompt = terminal();
    read_input(&prompt);
}

fn read_input(prompt: &Terminal) {
    match input().read_line() {
        Ok(input) => { /* Do some stuff */ },
        Err(_) => prompt.write("Bad stuff")
    }
    read_input(&prompt);
}

I didn't enabled raw modes, in fact I don't even know what they are... Am I messing something up?

from crossterm.

GarkGarcia avatar GarkGarcia commented on July 24, 2024

Is this fixed then, or will the fixes come out in version 5.2?

from crossterm.

TimonPost avatar TimonPost commented on July 24, 2024

Sorry, it took this long to fix this issue, I had some other crates to maintain. I will release a new version as soon as possible and put my priority on it. Version 0.6 will be the next one. I also have some other changes for the new feature so 5 or 6 days should everything be finished.

Does this issue have priority for you? You might want to fork the master branch and use that as a dependency since it has the fixes of this issue.

from crossterm.

GarkGarcia avatar GarkGarcia commented on July 24, 2024

Yeah sounds fine.

from crossterm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.