Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DisableBlinking does not work for line cursor shape in Konsole #740

Closed
ghost opened this issue Jan 9, 2023 · 2 comments
Closed

DisableBlinking does not work for line cursor shape in Konsole #740

ghost opened this issue Jan 9, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 9, 2023

Describe the bug
When using a line cursor shape, disable blinking does not work in Konsole.

To Reproduce
Compile and run this minimal example using Konsole:

use crossterm::{cursor, event, execute, style, terminal};
use std::io::{stdout, Write};

fn main() -> Result<(), std::io::Error> {
    execute!(
        stdout(),
        terminal::EnterAlternateScreen,
        style::ResetColor,
        cursor::MoveTo(0, 0)
    )?;
    stdout().flush()?;
    terminal::enable_raw_mode()?;

    execute!(
        stdout(),
        cursor::SetCursorShape(cursor::CursorShape::Line),
        cursor::DisableBlinking,
    )?;

    loop {
        if let event::Event::Key(event::KeyEvent { code, .. }) = event::read()? {
            if code == event::KeyCode::Char('q') {
                break;
            }
        }
    }

    terminal::disable_raw_mode()?;
    execute!(stdout(), terminal::LeaveAlternateScreen, style::ResetColor)?;

    Ok(())
}

Expected behavior
The cursor shows up as a line and does not blink.

OS

  • Arch Linux

Terminal/Console

  • Konsole
@ghost
Copy link
Author

ghost commented Jan 9, 2023

Related: #650

@TimonPost
Copy link
Member

Fixed by: #742

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant