Comments (7)
Thanks for creating the issue. This should be screen specific I need. However it is supposed to do that. I'll give it a look why this is not happening.
from crossterm.
let screen = crossterm::Screen::default();
match screen.enable_alternate_modes(false) {
Ok(alternative) => {
let ct = crossterm::Crossterm::from_screen(&alternative.screen);
let cursor = ct.cursor();
cursor.hide();
}
Err(e) => {}
I can't find why this would occur. I tested in on windows and got the same result as you. I still need to give it a test on a UNIX based machine and see if it is the same there. Also, I might chek if termion has the same problem.
from crossterm.
I think this issue is due to not restoring the previous console/terminal settings on shutdown. When applying syscalls to hide or show cursor, it needs to be reversed on exit -- checkout termbox-go's implementation.
from crossterm.
yes, that might be true. Did you check this for Unix systems? For WinApi it also seems like it operates terminal based and not screen based.
from crossterm.
I didn't check exactly on Unix systems, but looking at termbox-go: https://github.com/nsf/termbox-go/blob/master/api.go#L129
Notice how the code, upon closing, re-establishes some default state like showing the cursor back into stdout. Not sure if Unix-y systems has an equivalent to winapi's GetConsoleState, but it would be preferable to restore the preexisting state, rather than overwriting state (even if they are sane defaults)
from crossterm.
Ah, oke. It is just resetting everything back to default.
from crossterm.
Closing in favor of https://github.com/TimonPost/crossterm/issues/new
from crossterm.
Related Issues (20)
- SetUnderlineColor command error on Windows 7
- Unsupported input escape sequences reported as keypresses
- Panic in parse_csi_sgr_mouse
- random test failures in style::types::colored::tests::test_parse_ansi_bg/fg
- Temporarily disable async key event polling
- something wrong when running inside container
- `crossterm::event::poll(Duration::ZERO)` incorrectly returns false with `use-dev-tty` enabled
- Error on Windows PowerShell with event-read example
- Iterm2 unicode
- Why are ansi 3/4 bit colors not supported?
- Port from libc to rustix on Unix platforms HOT 4
- Surrogate pairs are ignored on Windows Terminal HOT 1
- Document the feature `use-dev-tty` on `crossterm::event::{poll, read}` HOT 1
- Event::Mouse doesn't capture modifiers in zellij HOT 1
- Support for sending ansi special characters to terminal
- `event::read` incorrectly returns `Esc` key press event while scrolling the mouse wheel HOT 1
- Padding when trying to fill whole terminal. HOT 1
- Terminal settings do not get restored on exit when using bash HOT 1
- Differentiate between keyboard/numpad chars
- Mac doesnt report Shift or Ctrl with enter key HOT 3
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.