summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2019-05-30 07:42:41 +0000
committernicm <nicm>2019-05-30 07:42:41 +0000
commit89d2c7eb2625804060092330f22ea211c2c97ba3 (patch)
treed1079fae20dd4de049f45a106fa9c667feeae040
parent7dced376737ef685e09fd5a49161ca2bf423e91b (diff)
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.
-rw-r--r--tmux.12
-rw-r--r--tty.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/tmux.1 b/tmux.1
index dfdd96b4..d9b37c0e 100644
--- a/tmux.1
+++ b/tmux.1
@@ -4325,7 +4325,7 @@ Align text to the left, centre or right of the available space if appropriate.
.It Xo Ic list=on ,
.Ic list=focus ,
.Ic list=left-marker ,
-.Ic list=right=marker ,
+.Ic list=right-marker ,
.Ic nolist
.Xc
Mark the position of the various window list components in the
diff --git a/tty.c b/tty.c
index 34403a1f..05df4f0f 100644
--- a/tty.c
+++ b/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;