Do you have 989cdca95fa2e1a4dc3849020838328aded09164?

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

Reply via email to