Closed psychon closed 9 months ago
Thanks!
It looks like something specific to this terminal.
This was initially implemented here: https://github.com/ArthurSonzogni/FTXUI/pull/505/files#diff-8b8c62b9f0fa9b20149ff00446386cc2ec079a0afc1c2e2828be4436df563cb6
I guess I meant to restore the cursor using:
on_exit_functions.push([=] {
std::cout << "\033[?25h"; // Enable cursor.
std::cout << "\033[?1 q"; // Cursor block blinking.
});
But this was only the "Cursor block blinking" one.
We would need a way to get the terminal to report the current cursor before modifyfing it.
I can confirm that for urxvt, the cursor no longer ends up as an underline, but is a block again after exiting a program. However, it started blinking after exiting the print_key_press
example, which it did not do before. I can live with that (and terminals are complicated...).
Hi,
running the
examples/component/focus_cursor.cpp
example and exiting with ctrl+c leaves the cursor in the terminal in the state that I last picked. If I understand correctly, exiting by ctrl+c is actually caught and is supposed to reset the terminal to its original state, but I might be wrong here.In
xterm
, runningreset
"fixes" this, but inurxvt
the cursor state even survives areset
.