From 858b469defaafecd22c0012d31f6cac3f933b6cc Mon Sep 17 00:00:00 2001 From: opencode Date: Tue, 24 Mar 2026 18:42:54 +0100 Subject: [PATCH] fix: correggi raw mode per terminali che non supportano bitwise OR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Usa lista invece di bitwise OR per attributi terminale - Compatibilità con piu versioni Python/termios --- terminal_ui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/terminal_ui.py b/terminal_ui.py index 891dd72..78153c7 100644 --- a/terminal_ui.py +++ b/terminal_ui.py @@ -141,7 +141,10 @@ class TerminalUI: # Raw mode fd = sys.stdin.fileno() old = termios.tcgetattr(fd) - termios.tcsetattr(fd, termios.TCSADRAIN, old | termios.ICANON | termios.ECHO) + # nuovo = disabilita ICANON e ECHO + new = list(old) + new[3] = new[3] & ~(termios.ICANON | termios.ECHO) + termios.tcsetattr(fd, termios.TCSADRAIN, new) self._draw()