Comments (9)
Thanis for letting me know I'll be one it...
from crossterm.
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.
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.
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.
@GarkGarcia Did you enable with crossterm raw modes for your terminal? And could you provide some code that reproduces this?
from crossterm.
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.
Is this fixed then, or will the fixes come out in version 5.2
?
from crossterm.
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.
Yeah sounds fine.
from crossterm.
Related Issues (20)
- iTerm2 image protocol for vscode
- Support OSC 52 for clipboard interraction HOT 1
- Support win32-input-mode
- `crossterm::event::poll` function fails on macOS with a timeout larger than 100 million seconds
- serde support for Attributes
- add support for win32-input-mode
- Synchronized Update doesn't work on Windows
- Support Pixel Coordinates in Mouse Events HOT 1
- Macros to reduce the syntactic burden of parsing events HOT 4
- Mouse down event isn't registered when it happened shortly after another click (double click)
- Document buffering behavior for events
- inconsistent and incorrect touch behaviour HOT 1
- available_color_count is wrong on Windows HOT 1
- Build break from #862
- Build error with use-dev-tty HOT 5
- * `use-dev-tty` is useless without `events`
- crossterm::terminal::size() returns Ok((0, 0)) in eshell
- Capture additional keys (Media keys, caps lock, etc.)
- Feature request: uefi support
- Can not capture `MediaKeyCode`s
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crossterm.