It looks like CUF and CUB stop at margins - compare this script with and
without the marked line:

    printf '\033[H\033[2J\033[?69h'
    printf '\033[15;5Hx'
    printf '\033[10;20s' # <-- this line
    printf '\033[15;10H\033[5Dy'
    printf '\n\n\n\n\033[s'

We could avoid using them if margins are in use, but we only really care
about margins for scrolling, so it seems better to turn them off for
normal characters. Please try this:

diff --git a/tty.c b/tty.c
index ac24a7f2..10ae1617 100644
--- a/tty.c
+++ b/tty.c
@@ -1702,13 +1702,11 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
                return;
 
        if (ctx->xoff + ctx->ocx - ctx->ox > tty->sx - 1 &&
-           ctx->ocy == ctx->orlower) {
-               if (tty_pane_full_width(tty, ctx))
-                       tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
-               else
-                       tty_margin_off(tty);
-       }
+           ctx->ocy == ctx->orlower &&
+           tty_pane_full_width(tty, ctx))
+               tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
 
+       tty_margin_off(tty);
        tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);
 
        tty_cell(tty, ctx->cell, ctx->wp);
@@ -1737,6 +1735,7 @@ tty_cmd_cells(struct tty *tty, const struct tty_ctx *ctx)
                return;
        }
 
+       tty_margin_off(tty);
        tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);
 
        tty_attributes(tty, ctx->cell, ctx->wp);





On Mon, Sep 10, 2018 at 03:07:25PM +0200, Thomas Sattler wrote:
> > It seems that in a tiled layout, misplaced chars are only
> > wrongly written into another pane "in the same line". Or
> > their common lower border, but not in the other panes
> > above or below (I'm talking about a 3x3 layout).
> 
> see attached sample file

> 11111111111111111111111111│22222222222222222222222222│33333333333333333333333333
> 11111111111111111111111111│22222222222222222222222222│33333333333333333333333333
> 11111111111111111111111111│22222222222222222222222222│33333333333333333333333333
> 11111111111111111111111111│22222222222222222222222222│33333333333333333333333333
> 11111111111111111111111111│22222222222222222222222222│33333333333333333333333333
> 11111111111111111111111111│22222222222222222222222222│33333333333333333333333333
> 1111111111                │22222222222222222222222222│33333333333333333333333
> ──────────────────────────┼──────────────────────────┼──────────────────────────
> 44444444444444444444444444│55555555555555555555555555│66666666666666666666666666
> 44444444444444444444444444│55555555555555555555555555│66666666666666666666666666
> 44444444444444444444444444│55555555555555555555555555│66666666666666 
> 66666666666
> 44444444444444444444444444│55555555555555555555555555│66666666666666666666666666
> 44444444444444444444444444│555555555555555555 
> 5555555│6666666666666666666666666
> 44444444444444444444444444│55555555555555555555555555│66666666666666666666666666
> 44444444                  │55555555                  │666666666
> 666───────────────────────┼──────────────────────────┼──────────────────────────
> 77777777777777777777777777│88888888888888888888888888│99999999999999999999999999
> 77777777777777777777777777│88888888888888888888888888│99999999999999999999999999
> 77777777777777777777777777│88888888888888888888888888│99999999999999999999999999
> 77777777777777777777777777│88888888888888888888888888│99999999999999999999999999
> 77777777777777777777777779│88888888888888888888888888│99999999999999999999999999
> 77777777777777777777777777│88888 88888888888888888888│9999999999 999 
> 99999999999
> 7777777777777             │888888888                 │99999999999999999

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to