Try this instead please:
Index: input.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/input.c,v
retrieving revision 1.119
diff -u -p -r1.119 input.c
--- input.c 22 Apr 2017 08:33:28 -0000 1.119
+++ input.c 11 May 2017 06:43:44 -0000
@@ -1308,7 +1308,8 @@ input_csi_dispatch(struct input_ctx *ict
}
break;
case INPUT_CSI_ECH:
- screen_write_clearcharacter(sctx, input_get(ictx, 0, 1, 1));
+ screen_write_clearcharacter(sctx, input_get(ictx, 0, 1, 1),
+ ictx->cell.cell.bg);
break;
case INPUT_CSI_DCH:
screen_write_deletecharacter(sctx, input_get(ictx, 0, 1, 1),
Index: screen-write.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/screen-write.c,v
retrieving revision 1.119
diff -u -p -r1.119 screen-write.c
--- screen-write.c 29 Apr 2017 21:27:46 -0000 1.119
+++ screen-write.c 11 May 2017 06:43:44 -0000
@@ -606,7 +606,7 @@ screen_write_deletecharacter(struct scre
/* Clear nx characters. */
void
-screen_write_clearcharacter(struct screen_write_ctx *ctx, u_int nx)
+screen_write_clearcharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
{
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
@@ -623,6 +623,7 @@ screen_write_clearcharacter(struct scree
return;
screen_write_initctx(ctx, &ttyctx);
+ ttyctx.bg = bg;
grid_view_clear(s->grid, s->cx, s->cy, nx, 1, 8);
Index: tmux.h
===================================================================
RCS file: /cvs/src/usr.bin/tmux/tmux.h,v
retrieving revision 1.763
diff -u -p -r1.763 tmux.h
--- tmux.h 10 May 2017 16:48:36 -0000 1.763
+++ tmux.h 11 May 2017 06:43:45 -0000
@@ -1996,7 +1996,7 @@ void screen_write_cursorleft(struct scr
void screen_write_alignmenttest(struct screen_write_ctx *);
void screen_write_insertcharacter(struct screen_write_ctx *, u_int, u_int);
void screen_write_deletecharacter(struct screen_write_ctx *, u_int, u_int);
-void screen_write_clearcharacter(struct screen_write_ctx *, u_int);
+void screen_write_clearcharacter(struct screen_write_ctx *, u_int, u_int);
void screen_write_insertline(struct screen_write_ctx *, u_int, u_int);
void screen_write_deleteline(struct screen_write_ctx *, u_int, u_int);
void screen_write_clearline(struct screen_write_ctx *, u_int);
Index: tty.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/tty.c,v
retrieving revision 1.272
diff -u -p -r1.272 tty.c
--- tty.c 10 May 2017 18:40:13 -0000 1.272
+++ tty.c 11 May 2017 06:43:45 -0000
@@ -1019,7 +1019,7 @@ tty_cmd_deletecharacter(struct tty *tty,
void
tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx)
{
- tty_attributes(tty, &grid_default_cell, ctx->wp);
+ tty_default_attributes(tty, ctx->wp, ctx->bg);
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
On Thu, May 11, 2017 at 08:33:20AM +0300, ?????????????? wrote:
> No, this didn't help. Now background for spaces is "random" (it is
> different every other tmux launch)
> I can submit issue on github with logs and all stuff if this is indeed a
> bug (I haven't done it yet because I found in "Note that TERM inside tmux
> must be a variant of screen or tmux" in CONTRIBUTING file and with
> TERM=screen-256color the problem doesnt exist)
> On Thu, May 11, 2017 at 12:34 AM, Nicholas Marriott
> <[email protected]> wrote:
>
> I don't know what you are looking at that has tty_reset, but the problem
> is most likely that ECH should take account of BCE, so it should call
> tty_default_atttributes instead of tty_attributes. Please try this:
>
> Index: tty.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/tmux/tty.c,v
> retrieving revision 1.272
> diff -u -p -r1.272 tty.c
> --- tty.cA A A A 10 May 2017 18:40:13 -0000A A A 1.272
> +++ tty.cA A A A 10 May 2017 21:34:36 -0000
> @@ -1019,7 +1019,9 @@ tty_cmd_deletecharacter(struct tty *tty,
> A void
> A tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx)
> A {
> -A A A A tty_attributes(tty, &grid_default_cell, ctx->wp);
> +A A A A struct window_paneA A A *wp = ctx->wp;
> +
> +A A A A tty_default_attributes(tty, wp, ctx->bg);
>
> A A A A tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
>
> On Wed, May 10, 2017 at 10:09:29PM +0300, ?????????????? wrote:
> >A A Hello.
> >A A I have unexpected and annoying (a bit) behaviour
> >A A withA tmux,A visA (https://github.com/martanne/vis)A and 256
> color
> >A A terminals supporting 'ech' terminfo entry (st-256color (true
> color also),
> >A A xterm-256color).
> >A A visA has status line (just like tmux).
> >A A But when i use st-256color or xterm-256color as TERM, it prints
> status
> >A A line with spaces on black background while other text is on gray
> >A A (http://i.imgur.com/DA4VdN5.png).
> >A A - line looks good when I use those terminals without tmux
> >A A - line looks good if i manually remove 'ech' in terminfo of those
> >A A terminals (or use screen-256color) (setting 'ech@' in
> terminal-overrides
> >A A doesn't help)
> >A A Investigations (btw debugging tmux is very satisfying :D) lead me
> to
> >A A conclusion that this is because there is a tty_reset right before
> 'ech'
> >A A command.
> >A A (which is there since this the beginning of
> >A A implementationA
>
> https://github.com/tmux/tmux/commit/44f8e1caffce2e887682c3314ee22becc09e1d3cA
> and
> >A A is inside tty_attributes in master)
> >A A When I comment call to tty_attributes inside
> tty_cmd_clearcharacter (or
> >A A use &tty->last_cell instead of grid_default_cell as 2nd argument)
> >A A everything becomes fine too (didn't fully understand wtf i was
> doing
> >A A actually)
> >A A From man terminfo:
> >A A A A command to erase n characters (equivalent to outputting n
> blanks
> >A A without moving the cursor) can be given asA echA with one
> parameter.
> >A A So I am wondering if this is a bug in tmux and if not, could
> someone
> >A A clarify this for me: Why do we need tty_reset there?
> >A A BR,
> >A A Evgeniy Stratonikov
> >
> >A A --
> >A A You received this message because you are subscribed to the
> Google Groups
> >A A "tmux-users" group.
> >A A To unsubscribe from this group and stop receiving emails from it,
> send an
> >A A email to [email protected].
> >A A To post to this group, send email to [email protected].
> >A A For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
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.