mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
I had hoped that non-xenl terminals had died out, at least in fairly
modern OSs, but no - DragonFly BSD's console returns to haunt us. Fix it at least somewhat. GitHub issue 1763.
This commit is contained in:
11
tty.c
11
tty.c
@ -527,6 +527,12 @@ tty_putc(struct tty *tty, u_char ch)
|
||||
{
|
||||
const char *acs;
|
||||
|
||||
if ((tty->term->flags & TERM_EARLYWRAP) &&
|
||||
ch >= 0x20 && ch != 0x7f &&
|
||||
tty->cy == tty->sy - 1 &&
|
||||
tty->cx + 1 >= tty->sx)
|
||||
return;
|
||||
|
||||
if (tty->cell.attr & GRID_ATTR_CHARSET) {
|
||||
acs = tty_acs_get(tty, ch);
|
||||
if (acs != NULL)
|
||||
@ -557,6 +563,11 @@ tty_putc(struct tty *tty, u_char ch)
|
||||
void
|
||||
tty_putn(struct tty *tty, const void *buf, size_t len, u_int width)
|
||||
{
|
||||
if ((tty->term->flags & TERM_EARLYWRAP) &&
|
||||
tty->cy == tty->sy - 1 &&
|
||||
tty->cx + len >= tty->sx)
|
||||
len = tty->sx - tty->cx - 1;
|
||||
|
||||
tty_add(tty, buf, len);
|
||||
if (tty->cx + width > tty->sx) {
|
||||
tty->cx = (tty->cx + width) - tty->sx;
|
||||
|
Reference in New Issue
Block a user