Make cursor visible after commands

Just like we already fix terminal modes if a command left them broken,
having an invisible cursor makes the terminal hard to use and so we
fix it.

We can't really use cnorm/cursor_normal because that often includes
other gunk like making the cursor blink, but it turns out every
terminfo entry agrees on the sequence to make the cursor visible, so
we hardcode it.

Fixes #10834
This commit is contained in:
Fabian Boehm 2024-11-06 18:53:12 +01:00
parent bfc68345c9
commit c1fbe237c9

View file

@ -667,6 +667,9 @@ fn read_i(parser: &Parser) -> i32 {
// Allow any pending history items to be returned in the history array.
data.history.resolve_pending();
// Make cursor visible. Every even vaguely used terminal agrees on this sequence.
data.screen.write_bytes(b"\x1b[?12l");
let already_warned = data.did_warn_for_bg_jobs;
if check_exit_loop_maybe_warning(Some(&mut data)) {
break;