[BACK]Return to tty.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/tty.c between version 1.429 and 1.430

version 1.429, 2023/04/25 09:24:44 version 1.430, 2023/04/25 09:31:50
Line 405 
Line 405 
         if (tcsetattr(c->fd, TCSANOW, &tty->tio) == -1)          if (tcsetattr(c->fd, TCSANOW, &tty->tio) == -1)
                 return;                  return;
   
         tty_raw(tty, tty_term_string2(tty->term, TTYC_CSR, 0, ws.ws_row - 1));          tty_raw(tty, tty_term_string_ii(tty->term, TTYC_CSR, 0, ws.ws_row - 1));
         if (tty_acs_needed(tty))          if (tty_acs_needed(tty))
                 tty_raw(tty, tty_term_string(tty->term, TTYC_RMACS));                  tty_raw(tty, tty_term_string(tty->term, TTYC_RMACS));
         tty_raw(tty, tty_term_string(tty->term, TTYC_SGR0));          tty_raw(tty, tty_term_string(tty->term, TTYC_SGR0));
Line 415 
Line 415 
                 if (tty_term_has(tty->term, TTYC_SE))                  if (tty_term_has(tty->term, TTYC_SE))
                         tty_raw(tty, tty_term_string(tty->term, TTYC_SE));                          tty_raw(tty, tty_term_string(tty->term, TTYC_SE));
                 else if (tty_term_has(tty->term, TTYC_SS))                  else if (tty_term_has(tty->term, TTYC_SS))
                         tty_raw(tty, tty_term_string1(tty->term, TTYC_SS, 0));                          tty_raw(tty, tty_term_string_i(tty->term, TTYC_SS, 0));
         }          }
         if (tty->ccolour != -1)          if (tty->ccolour != -1)
                 tty_raw(tty, tty_term_string(tty->term, TTYC_CR));                  tty_raw(tty, tty_term_string(tty->term, TTYC_CR));
Line 514 
Line 514 
 }  }
   
 void  void
 tty_putcode1(struct tty *tty, enum tty_code_code code, int a)  tty_putcode_i(struct tty *tty, enum tty_code_code code, int a)
 {  {
         if (a < 0)          if (a < 0)
                 return;                  return;
         tty_puts(tty, tty_term_string1(tty->term, code, a));          tty_puts(tty, tty_term_string_i(tty->term, code, a));
 }  }
   
 void  void
 tty_putcode2(struct tty *tty, enum tty_code_code code, int a, int b)  tty_putcode_ii(struct tty *tty, enum tty_code_code code, int a, int b)
 {  {
         if (a < 0 || b < 0)          if (a < 0 || b < 0)
                 return;                  return;
         tty_puts(tty, tty_term_string2(tty->term, code, a, b));          tty_puts(tty, tty_term_string_ii(tty->term, code, a, b));
 }  }
   
 void  void
 tty_putcode3(struct tty *tty, enum tty_code_code code, int a, int b, int c)  tty_putcode_iii(struct tty *tty, enum tty_code_code code, int a, int b, int c)
 {  {
         if (a < 0 || b < 0 || c < 0)          if (a < 0 || b < 0 || c < 0)
                 return;                  return;
         tty_puts(tty, tty_term_string3(tty->term, code, a, b, c));          tty_puts(tty, tty_term_string_iii(tty->term, code, a, b, c));
 }  }
   
 void  void
 tty_putcode_ptr1(struct tty *tty, enum tty_code_code code, const void *a)  tty_putcode_s(struct tty *tty, enum tty_code_code code, const char *a)
 {  {
         if (a != NULL)          if (a != NULL)
                 tty_puts(tty, tty_term_ptr1(tty->term, code, a));                  tty_puts(tty, tty_term_string_s(tty->term, code, a));
 }  }
   
 void  void
 tty_putcode_ptr2(struct tty *tty, enum tty_code_code code, const void *a,  tty_putcode_ss(struct tty *tty, enum tty_code_code code, const char *a,
     const void *b)      const char *b)
 {  {
         if (a != NULL && b != NULL)          if (a != NULL && b != NULL)
                 tty_puts(tty, tty_term_ptr2(tty->term, code, a, b));                  tty_puts(tty, tty_term_string_ss(tty->term, code, a, b));
 }  }
   
 static void  static void
Line 611 
Line 611 
                          * it works on sensible terminals as well.                           * it works on sensible terminals as well.
                          */                           */
                         if (tty->term->flags & TERM_NOAM)                          if (tty->term->flags & TERM_NOAM)
                                 tty_putcode2(tty, TTYC_CUP, tty->cy, tty->cx);                                  tty_putcode_ii(tty, TTYC_CUP, tty->cy, tty->cx);
                 } else                  } else
                         tty->cx++;                          tty->cx++;
         }          }
Line 690 
Line 690 
         else {          else {
                 colour_split_rgb(c, &r, &g, &b);                  colour_split_rgb(c, &r, &g, &b);
                 xsnprintf(s, sizeof s, "rgb:%02hhx/%02hhx/%02hhx", r, g, b);                  xsnprintf(s, sizeof s, "rgb:%02hhx/%02hhx/%02hhx", r, g, b);
                 tty_putcode_ptr1(tty, TTYC_CS, s);                  tty_putcode_s(tty, TTYC_CS, s);
         }          }
         tty->ccolour = c;          tty->ccolour = c;
 }  }
Line 751 
Line 751 
                         if (tty_term_has(tty->term, TTYC_SE))                          if (tty_term_has(tty->term, TTYC_SE))
                                 tty_putcode(tty, TTYC_SE);                                  tty_putcode(tty, TTYC_SE);
                         else                          else
                                 tty_putcode1(tty, TTYC_SS, 0);                                  tty_putcode_i(tty, TTYC_SS, 0);
                 }                  }
                 if (cmode & (MODE_CURSOR_BLINKING|MODE_CURSOR_VERY_VISIBLE))                  if (cmode & (MODE_CURSOR_BLINKING|MODE_CURSOR_VERY_VISIBLE))
                         tty_putcode(tty, TTYC_CVVIS);                          tty_putcode(tty, TTYC_CVVIS);
Line 759 
Line 759 
         case SCREEN_CURSOR_BLOCK:          case SCREEN_CURSOR_BLOCK:
                 if (tty_term_has(tty->term, TTYC_SS)) {                  if (tty_term_has(tty->term, TTYC_SS)) {
                         if (cmode & MODE_CURSOR_BLINKING)                          if (cmode & MODE_CURSOR_BLINKING)
                                 tty_putcode1(tty, TTYC_SS, 1);                                  tty_putcode_i(tty, TTYC_SS, 1);
                         else                          else
                                 tty_putcode1(tty, TTYC_SS, 2);                                  tty_putcode_i(tty, TTYC_SS, 2);
                 } else if (cmode & MODE_CURSOR_BLINKING)                  } else if (cmode & MODE_CURSOR_BLINKING)
                         tty_putcode(tty, TTYC_CVVIS);                          tty_putcode(tty, TTYC_CVVIS);
                 break;                  break;
         case SCREEN_CURSOR_UNDERLINE:          case SCREEN_CURSOR_UNDERLINE:
                 if (tty_term_has(tty->term, TTYC_SS)) {                  if (tty_term_has(tty->term, TTYC_SS)) {
                         if (cmode & MODE_CURSOR_BLINKING)                          if (cmode & MODE_CURSOR_BLINKING)
                                 tty_putcode1(tty, TTYC_SS, 3);                                  tty_putcode_i(tty, TTYC_SS, 3);
                         else                          else
                                 tty_putcode1(tty, TTYC_SS, 4);                                  tty_putcode_i(tty, TTYC_SS, 4);
                 } else if (cmode & MODE_CURSOR_BLINKING)                  } else if (cmode & MODE_CURSOR_BLINKING)
                         tty_putcode(tty, TTYC_CVVIS);                          tty_putcode(tty, TTYC_CVVIS);
                 break;                  break;
         case SCREEN_CURSOR_BAR:          case SCREEN_CURSOR_BAR:
                 if (tty_term_has(tty->term, TTYC_SS)) {                  if (tty_term_has(tty->term, TTYC_SS)) {
                         if (cmode & MODE_CURSOR_BLINKING)                          if (cmode & MODE_CURSOR_BLINKING)
                                 tty_putcode1(tty, TTYC_SS, 5);                                  tty_putcode_i(tty, TTYC_SS, 5);
                         else                          else
                                 tty_putcode1(tty, TTYC_SS, 6);                                  tty_putcode_i(tty, TTYC_SS, 6);
                 } else if (cmode & MODE_CURSOR_BLINKING)                  } else if (cmode & MODE_CURSOR_BLINKING)
                         tty_putcode(tty, TTYC_CVVIS);                          tty_putcode(tty, TTYC_CVVIS);
                 break;                  break;
Line 835 
Line 835 
     enum tty_code_code code1, u_int n)      enum tty_code_code code1, u_int n)
 {  {
         if (tty_term_has(tty->term, code))          if (tty_term_has(tty->term, code))
                 tty_putcode1(tty, code, n);                  tty_putcode_i(tty, code, n);
         else {          else {
                 while (n-- > 0)                  while (n-- > 0)
                         tty_putcode(tty, code1);                          tty_putcode(tty, code1);
Line 1124 
Line 1124 
                 /* Section of line. Use ECH if possible. */                  /* Section of line. Use ECH if possible. */
                 if (tty_term_has(tty->term, TTYC_ECH)) {                  if (tty_term_has(tty->term, TTYC_ECH)) {
                         tty_cursor(tty, px, py);                          tty_cursor(tty, px, py);
                         tty_putcode1(tty, TTYC_ECH, nx);                          tty_putcode_i(tty, TTYC_ECH, nx);
                         return;                          return;
                 }                  }
         }          }
Line 1265 
Line 1265 
                     tty_term_has(tty->term, TTYC_INDN)) {                      tty_term_has(tty->term, TTYC_INDN)) {
                         tty_region(tty, py, py + ny - 1);                          tty_region(tty, py, py + ny - 1);
                         tty_margin_off(tty);                          tty_margin_off(tty);
                         tty_putcode1(tty, TTYC_INDN, ny);                          tty_putcode_i(tty, TTYC_INDN, ny);
                         return;                          return;
                 }                  }
   
Line 1280 
Line 1280 
                     tty_term_has(tty->term, TTYC_INDN)) {                      tty_term_has(tty->term, TTYC_INDN)) {
                         tty_region(tty, py, py + ny - 1);                          tty_region(tty, py, py + ny - 1);
                         tty_margin(tty, px, px + nx - 1);                          tty_margin(tty, px, px + nx - 1);
                         tty_putcode1(tty, TTYC_INDN, ny);                          tty_putcode_i(tty, TTYC_INDN, ny);
                         return;                          return;
                 }                  }
         }          }
Line 1587 
Line 1587 
   
         if (tty_term_has(tty->term, TTYC_SYNC)) {          if (tty_term_has(tty->term, TTYC_SYNC)) {
                 log_debug("%s sync start", tty->client->name);                  log_debug("%s sync start", tty->client->name);
                 tty_putcode1(tty, TTYC_SYNC, 1);                  tty_putcode_i(tty, TTYC_SYNC, 1);
         }          }
 }  }
   
Line 1602 
Line 1602 
   
         if (tty_term_has(tty->term, TTYC_SYNC)) {          if (tty_term_has(tty->term, TTYC_SYNC)) {
                 log_debug("%s sync end", tty->client->name);                  log_debug("%s sync end", tty->client->name);
                 tty_putcode1(tty, TTYC_SYNC, 2);                  tty_putcode_i(tty, TTYC_SYNC, 2);
         }          }
 }  }
   
Line 1820 
Line 1820 
         if (tty_term_has(tty->term, TTYC_RI))          if (tty_term_has(tty->term, TTYC_RI))
                 tty_putcode(tty, TTYC_RI);                  tty_putcode(tty, TTYC_RI);
         else          else
                 tty_putcode1(tty, TTYC_RIN, 1);                  tty_putcode_i(tty, TTYC_RIN, 1);
 }  }
   
 void  void
Line 1901 
Line 1901 
                         tty_cursor(tty, 0, 0);                          tty_cursor(tty, 0, 0);
                 else                  else
                         tty_cursor(tty, 0, tty->cy);                          tty_cursor(tty, 0, tty->cy);
                 tty_putcode1(tty, TTYC_INDN, ctx->num);                  tty_putcode_i(tty, TTYC_INDN, ctx->num);
         }          }
 }  }
   
Line 1932 
Line 1932 
         tty_cursor_pane(tty, ctx, ctx->ocx, ctx->orupper);          tty_cursor_pane(tty, ctx, ctx->ocx, ctx->orupper);
   
         if (tty_term_has(tty->term, TTYC_RIN))          if (tty_term_has(tty->term, TTYC_RIN))
                 tty_putcode1(tty, TTYC_RIN, ctx->num);                  tty_putcode_i(tty, TTYC_RIN, ctx->num);
         else {          else {
                 for (i = 0; i < ctx->num; i++)                  for (i = 0; i < ctx->num; i++)
                         tty_putcode(tty, TTYC_RI);                          tty_putcode(tty, TTYC_RI);
Line 2137 
Line 2137 
   
         b64_ntop(buf, len, encoded, size);          b64_ntop(buf, len, encoded, size);
         tty->flags |= TTY_NOBLOCK;          tty->flags |= TTY_NOBLOCK;
         tty_putcode_ptr2(tty, TTYC_MS, flags, encoded);          tty_putcode_ss(tty, TTYC_MS, flags, encoded);
   
         free(encoded);          free(encoded);
 }  }
Line 2210 
Line 2210 
   
         if (!grid_cells_equal(gc, &grid_default_cell)) {          if (!grid_cells_equal(gc, &grid_default_cell)) {
                 if (gc->link != 0)                  if (gc->link != 0)
                         tty_putcode_ptr2(tty, TTYC_HLS, "", "");                          tty_putcode_ss(tty, TTYC_HLS, "", "");
                 if ((gc->attr & GRID_ATTR_CHARSET) && tty_acs_needed(tty))                  if ((gc->attr & GRID_ATTR_CHARSET) && tty_acs_needed(tty))
                         tty_putcode(tty, TTYC_RMACS);                          tty_putcode(tty, TTYC_RMACS);
                 tty_putcode(tty, TTYC_SGR0);                  tty_putcode(tty, TTYC_SGR0);
Line 2285 
Line 2285 
                         tty_cursor(tty, 0, tty->cy);                          tty_cursor(tty, 0, tty->cy);
         }          }
   
         tty_putcode2(tty, TTYC_CSR, tty->rupper, tty->rlower);          tty_putcode_ii(tty, TTYC_CSR, tty->rupper, tty->rlower);
         tty->cx = tty->cy = UINT_MAX;          tty->cx = tty->cy = UINT_MAX;
 }  }
   
Line 2313 
Line 2313 
         if (tty->rleft == rleft && tty->rright == rright)          if (tty->rleft == rleft && tty->rright == rright)
                 return;                  return;
   
         tty_putcode2(tty, TTYC_CSR, tty->rupper, tty->rlower);          tty_putcode_ii(tty, TTYC_CSR, tty->rupper, tty->rlower);
   
         tty->rleft = rleft;          tty->rleft = rleft;
         tty->rright = rright;          tty->rright = rright;
Line 2321 
Line 2321 
         if (rleft == 0 && rright == tty->sx - 1)          if (rleft == 0 && rright == tty->sx - 1)
                 tty_putcode(tty, TTYC_CLMG);                  tty_putcode(tty, TTYC_CLMG);
         else          else
                 tty_putcode2(tty, TTYC_CMG, rleft, rright);                  tty_putcode_ii(tty, TTYC_CMG, rleft, rright);
         tty->cx = tty->cy = UINT_MAX;          tty->cx = tty->cy = UINT_MAX;
 }  }
   
Line 2431 
Line 2431 
                  * the cursor with CUB/CUF.                   * the cursor with CUB/CUF.
                  */                   */
                 if ((u_int) abs(change) > cx && tty_term_has(term, TTYC_HPA)) {                  if ((u_int) abs(change) > cx && tty_term_has(term, TTYC_HPA)) {
                         tty_putcode1(tty, TTYC_HPA, cx);                          tty_putcode_i(tty, TTYC_HPA, cx);
                         goto out;                          goto out;
                 } else if (change > 0 &&                  } else if (change > 0 &&
                     tty_term_has(term, TTYC_CUB) &&                      tty_term_has(term, TTYC_CUB) &&
Line 2441 
Line 2441 
                                 tty_putcode(tty, TTYC_CUB1);                                  tty_putcode(tty, TTYC_CUB1);
                                 goto out;                                  goto out;
                         }                          }
                         tty_putcode1(tty, TTYC_CUB, change);                          tty_putcode_i(tty, TTYC_CUB, change);
                         goto out;                          goto out;
                 } else if (change < 0 &&                  } else if (change < 0 &&
                     tty_term_has(term, TTYC_CUF) &&                      tty_term_has(term, TTYC_CUF) &&
                     !tty_use_margin(tty)) {                      !tty_use_margin(tty)) {
                         tty_putcode1(tty, TTYC_CUF, -change);                          tty_putcode_i(tty, TTYC_CUF, -change);
                         goto out;                          goto out;
                 }                  }
         } else if (cx == thisx) {          } else if (cx == thisx) {
Line 2479 
Line 2479 
                     (change < 0 && cy - change > tty->rlower) ||                      (change < 0 && cy - change > tty->rlower) ||
                     (change > 0 && cy - change < tty->rupper)) {                      (change > 0 && cy - change < tty->rupper)) {
                             if (tty_term_has(term, TTYC_VPA)) {                              if (tty_term_has(term, TTYC_VPA)) {
                                     tty_putcode1(tty, TTYC_VPA, cy);                                      tty_putcode_i(tty, TTYC_VPA, cy);
                                     goto out;                                      goto out;
                             }                              }
                 } else if (change > 0 && tty_term_has(term, TTYC_CUU)) {                  } else if (change > 0 && tty_term_has(term, TTYC_CUU)) {
                         tty_putcode1(tty, TTYC_CUU, change);                          tty_putcode_i(tty, TTYC_CUU, change);
                         goto out;                          goto out;
                 } else if (change < 0 && tty_term_has(term, TTYC_CUD)) {                  } else if (change < 0 && tty_term_has(term, TTYC_CUD)) {
                         tty_putcode1(tty, TTYC_CUD, -change);                          tty_putcode_i(tty, TTYC_CUD, -change);
                         goto out;                          goto out;
                 }                  }
         }          }
   
 absolute:  absolute:
         /* Absolute movement. */          /* Absolute movement. */
         tty_putcode2(tty, TTYC_CUP, cy, cx);          tty_putcode_ii(tty, TTYC_CUP, cy, cx);
   
 out:  out:
         tty->cx = cx;          tty->cx = cx;
Line 2514 
Line 2514 
                 return;                  return;
   
         if (gc->link == 0 || !hyperlinks_get(hl, gc->link, &uri, NULL, &id))          if (gc->link == 0 || !hyperlinks_get(hl, gc->link, &uri, NULL, &id))
                 tty_putcode_ptr2(tty, TTYC_HLS, "", "");                  tty_putcode_ss(tty, TTYC_HLS, "", "");
         else          else
                 tty_putcode_ptr2(tty, TTYC_HLS, id, uri);                  tty_putcode_ss(tty, TTYC_HLS, id, uri);
 }  }
   
 void  void
Line 2593 
Line 2593 
                     !tty_term_has(tty->term, TTYC_SMULX))                      !tty_term_has(tty->term, TTYC_SMULX))
                         tty_putcode(tty, TTYC_SMUL);                          tty_putcode(tty, TTYC_SMUL);
                 else if (changed & GRID_ATTR_UNDERSCORE_2)                  else if (changed & GRID_ATTR_UNDERSCORE_2)
                         tty_putcode1(tty, TTYC_SMULX, 2);                          tty_putcode_i(tty, TTYC_SMULX, 2);
                 else if (changed & GRID_ATTR_UNDERSCORE_3)                  else if (changed & GRID_ATTR_UNDERSCORE_3)
                         tty_putcode1(tty, TTYC_SMULX, 3);                          tty_putcode_i(tty, TTYC_SMULX, 3);
                 else if (changed & GRID_ATTR_UNDERSCORE_4)                  else if (changed & GRID_ATTR_UNDERSCORE_4)
                         tty_putcode1(tty, TTYC_SMULX, 4);                          tty_putcode_i(tty, TTYC_SMULX, 4);
                 else if (changed & GRID_ATTR_UNDERSCORE_5)                  else if (changed & GRID_ATTR_UNDERSCORE_5)
                         tty_putcode1(tty, TTYC_SMULX, 5);                          tty_putcode_i(tty, TTYC_SMULX, 5);
         }          }
         if (changed & GRID_ATTR_BLINK)          if (changed & GRID_ATTR_BLINK)
                 tty_putcode(tty, TTYC_BLINK);                  tty_putcode(tty, TTYC_BLINK);
Line 2656 
Line 2656 
                                 if (have_ax)                                  if (have_ax)
                                         tty_puts(tty, "\033[39m");                                          tty_puts(tty, "\033[39m");
                                 else if (tc->fg != 7)                                  else if (tc->fg != 7)
                                         tty_putcode1(tty, TTYC_SETAF, 7);                                          tty_putcode_i(tty, TTYC_SETAF, 7);
                                 tc->fg = gc->fg;                                  tc->fg = gc->fg;
                         }                          }
                         if (COLOUR_DEFAULT(gc->bg) && !COLOUR_DEFAULT(tc->bg)) {                          if (COLOUR_DEFAULT(gc->bg) && !COLOUR_DEFAULT(tc->bg)) {
                                 if (have_ax)                                  if (have_ax)
                                         tty_puts(tty, "\033[49m");                                          tty_puts(tty, "\033[49m");
                                 else if (tc->bg != 0)                                  else if (tc->bg != 0)
                                         tty_putcode1(tty, TTYC_SETAB, 0);                                          tty_putcode_i(tty, TTYC_SETAB, 0);
                                 tc->bg = gc->bg;                                  tc->bg = gc->bg;
                         }                          }
                 }                  }
Line 2833 
Line 2833 
                         xsnprintf(s, sizeof s, "\033[%dm", gc->fg);                          xsnprintf(s, sizeof s, "\033[%dm", gc->fg);
                         tty_puts(tty, s);                          tty_puts(tty, s);
                 } else                  } else
                         tty_putcode1(tty, TTYC_SETAF, gc->fg - 90 + 8);                          tty_putcode_i(tty, TTYC_SETAF, gc->fg - 90 + 8);
                 goto save;                  goto save;
         }          }
   
         /* Otherwise set the foreground colour. */          /* Otherwise set the foreground colour. */
         tty_putcode1(tty, TTYC_SETAF, gc->fg);          tty_putcode_i(tty, TTYC_SETAF, gc->fg);
   
 save:  save:
         /* Save the new values in the terminal current cell. */          /* Save the new values in the terminal current cell. */
Line 2865 
Line 2865 
                         xsnprintf(s, sizeof s, "\033[%dm", gc->bg + 10);                          xsnprintf(s, sizeof s, "\033[%dm", gc->bg + 10);
                         tty_puts(tty, s);                          tty_puts(tty, s);
                 } else                  } else
                         tty_putcode1(tty, TTYC_SETAB, gc->bg - 90 + 8);                          tty_putcode_i(tty, TTYC_SETAB, gc->bg - 90 + 8);
                 goto save;                  goto save;
         }          }
   
         /* Otherwise set the background colour. */          /* Otherwise set the background colour. */
         tty_putcode1(tty, TTYC_SETAB, gc->bg);          tty_putcode_i(tty, TTYC_SETAB, gc->bg);
   
 save:  save:
         /* Save the new values in the terminal current cell. */          /* Save the new values in the terminal current cell. */
Line 2906 
Line 2906 
          * non-RGB version may be wrong.           * non-RGB version may be wrong.
          */           */
         if (tty_term_has(tty->term, TTYC_SETULC))          if (tty_term_has(tty->term, TTYC_SETULC))
                 tty_putcode1(tty, TTYC_SETULC, c);                  tty_putcode_i(tty, TTYC_SETULC, c);
         else if (tty_term_has(tty->term, TTYC_SETAL) &&          else if (tty_term_has(tty->term, TTYC_SETAL) &&
             tty_term_has(tty->term, TTYC_RGB))              tty_term_has(tty->term, TTYC_RGB))
                 tty_putcode1(tty, TTYC_SETAL, c);                  tty_putcode_i(tty, TTYC_SETAL, c);
   
 save:  save:
         /* Save the new values in the terminal current cell. */          /* Save the new values in the terminal current cell. */
Line 2923 
Line 2923 
   
         if (colour & COLOUR_FLAG_256) {          if (colour & COLOUR_FLAG_256) {
                 if (*type == '3' && tty_term_has(tty->term, TTYC_SETAF))                  if (*type == '3' && tty_term_has(tty->term, TTYC_SETAF))
                         tty_putcode1(tty, TTYC_SETAF, colour & 0xff);                          tty_putcode_i(tty, TTYC_SETAF, colour & 0xff);
                 else if (tty_term_has(tty->term, TTYC_SETAB))                  else if (tty_term_has(tty->term, TTYC_SETAB))
                         tty_putcode1(tty, TTYC_SETAB, colour & 0xff);                          tty_putcode_i(tty, TTYC_SETAB, colour & 0xff);
                 return (0);                  return (0);
         }          }
   
         if (colour & COLOUR_FLAG_RGB) {          if (colour & COLOUR_FLAG_RGB) {
                 colour_split_rgb(colour & 0xffffff, &r, &g, &b);                  colour_split_rgb(colour & 0xffffff, &r, &g, &b);
                 if (*type == '3' && tty_term_has(tty->term, TTYC_SETRGBF))                  if (*type == '3' && tty_term_has(tty->term, TTYC_SETRGBF))
                         tty_putcode3(tty, TTYC_SETRGBF, r, g, b);                          tty_putcode_iii(tty, TTYC_SETRGBF, r, g, b);
                 else if (tty_term_has(tty->term, TTYC_SETRGBB))                  else if (tty_term_has(tty->term, TTYC_SETRGBB))
                         tty_putcode3(tty, TTYC_SETRGBB, r, g, b);                          tty_putcode_iii(tty, TTYC_SETRGBB, r, g, b);
                 return (0);                  return (0);
         }          }
   
Line 3018 
Line 3018 
   
         if ((~tty->flags & TTY_STARTED) || (tty->flags & TTY_OSC52QUERY))          if ((~tty->flags & TTY_STARTED) || (tty->flags & TTY_OSC52QUERY))
                 return;                  return;
         tty_putcode_ptr2(tty, TTYC_MS, "", "?");          tty_putcode_ss(tty, TTYC_MS, "", "?");
   
         tty->flags |= TTY_OSC52QUERY;          tty->flags |= TTY_OSC52QUERY;
         evtimer_set(&tty->clipboard_timer, tty_clipboard_query_callback, tty);          evtimer_set(&tty->clipboard_timer, tty_clipboard_query_callback, tty);

Legend:
Removed from v.1.429  
changed lines
  Added in v.1.430