Add mouse mode cleanup in IO.

This commit is contained in:
2026-08-22 22:58:01 +01:00
parent 3563324a1c
commit 2ac71085db
+1 -1
View File
@@ -66,7 +66,7 @@ std::pair<uint16_t, uint16_t> IO::cursor_position() {
void IO::cleanup() { void IO::cleanup() {
if (cleaned) if (cleaned)
return; return;
std::string os = "\x1b[?2004l"; std::string os = "\x1b[?1000l\x1b[?2004l";
write_all(STDOUT_FILENO, os.c_str(), os.size()); write_all(STDOUT_FILENO, os.c_str(), os.size());
if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios) == -1) if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios) == -1)
perror("Can't clean up terminal."); perror("Can't clean up terminal.");