Comment by tsowell
12 hours ago
Fellow VT420 user here! The problem with tmux is that it disables flow control, but you can fix that with this:
diff --git a/tty.c b/tty.c
index 359dc13..f98c9c4 100644
--- a/tty.c
+++ b/tty.c
@@ -319,8 +319,8 @@ tty_start_tty(struct tty *tty)
event_add(&tty->event_in, NULL);
memcpy(&tio, &tty->tio, sizeof tio);
- tio.c_iflag &= ~(IXON|IXOFF|ICRNL|INLCR|IGNCR|IMAXBEL|ISTRIP);
- tio.c_iflag |= IGNBRK;
+ tio.c_iflag &= ~(IXOFF|ICRNL|INLCR|IGNCR|IMAXBEL|ISTRIP);
+ tio.c_iflag |= IXON|IGNBRK;
tio.c_oflag &= ~(OPOST|ONLCR|OCRNL|ONLRET);
tio.c_lflag &= ~(IEXTEN|ICANON|ECHO|ECHOE|ECHONL|ECHOCTL|ECHOPRT|
ECHOKE|ISIG);
Then you'll want to run this before starting tmux:
stty -iutf8 ixon
export LANG=en_US
I also recommend using a dedicated tmux socket with the VT to avoid accidentally connecting to an unpatched tmux server that helpfully re-disables flow control. That happened to me while I was testing the patch, and it was infuriating.
I've also hacked up support for storing tmux window contents in different pages of VT memory, so you can switch windows instantly without waiting for full screen redraws. It's a bit rough around the edges (doesn't handle split windows very well, for example), but it's enough of a quality-of-life improvement that I use it anyway. It's a bit long for a comment, but I can post it somewhere if you're interested.
Feel free to email me if you want more information about my setup.
No comments yet
Contribute on Hacker News ↗