From e1416534140849bd4b317db0715ead0bf5ac0b2a Mon Sep 17 00:00:00 2001 From: Armin Date: Sun, 22 Nov 2026 21:36:54 +0100 Subject: [PATCH] Disable client auto-wrap to prevent display corruption Turn off DECAWM in the attached client terminal and restore it on detach. With auto-wrap enabled, writes to the last column can trigger pending-wrap behavior and corrupt full-screen redraws, especially on the last/input line. --- murx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/murx.c b/murx.c index 41661f8..15e6090 100644 --- a/murx.c +++ b/murx.c @@ -4688,7 +4688,7 @@ static int tty_raw(struct termios *saved) { } static void tty_restore(struct termios *saved) { - const char *seq = "\x1b[?1l\x1b[0m\x1b[?25h\x1b[?1049l"; + const char *seq = "\x1b[?1l\x1b[?7h\x1b[0m\x1b[?25h\x1b[?1049l"; write_all(STDOUT_FILENO, seq, strlen(seq)); tcsetattr(STDIN_FILENO, TCSAFLUSH, saved); } @@ -4760,7 +4760,7 @@ static int run_client(int fd, const char *name, unsigned char prefix, int status signal(SIGPIPE, SIG_IGN); { - const char *seq = "\x1b[?1049h\x1b[?1l\x1b[?25l\x1b[2J\x1b[H"; + const char *seq = "\x1b[?1049h\x1b[?7l\x1b[?1l\x1b[?25l\x1b[2J\x1b[H"; write_all(STDOUT_FILENO, seq, strlen(seq)); }