diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-02-07 20:01:14 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-02-07 20:01:14 +0000 |
commit | 5aaf64062929a4b43ab58a8d3072d5e126e15424 (patch) | |
tree | ca6ac9b95dd1a333fcf62c2e8d598640bd361793 /tty.c | |
parent | 178289fb4c9d30a9d8cde60ef9d055c6a7e9882b (diff) | |
parent | c0a34821c14fd8ca7dd77782cb919028826ee4b9 (diff) | |
download | rtmux-5aaf64062929a4b43ab58a8d3072d5e126e15424.tar.gz rtmux-5aaf64062929a4b43ab58a8d3072d5e126e15424.tar.bz2 rtmux-5aaf64062929a4b43ab58a8d3072d5e126e15424.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1356,13 +1356,15 @@ tty_margin(struct tty *tty, u_int rleft, u_int rright) if (tty->rleft == rleft && tty->rright == rright) return; - tty->rupper = 0; - tty->rlower = tty->sy - 1; + tty_putcode2(tty, TTYC_CSR, tty->rupper, tty->rlower); tty->rleft = rleft; tty->rright = rright; - snprintf(s, sizeof s, "\033[r\033[%u;%us", rleft + 1, rright + 1); + if (rleft == 0 && rright == tty->sx - 1) + snprintf(s, sizeof s, "\033[s"); + else + snprintf(s, sizeof s, "\033[%u;%us", rleft + 1, rright + 1); tty_puts(tty, s); tty->cx = tty->cy = 0; } |