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

Diff for /src/usr.bin/tmux/tty-keys.c between version 1.165 and 1.166

version 1.165, 2023/01/09 14:12:41 version 1.166, 2023/04/17 17:57:35
Line 1008 
Line 1008 
   
 /*  /*
  * Handle mouse key input. Returns 0 for success, -1 for failure, 1 for partial   * Handle mouse key input. Returns 0 for success, -1 for failure, 1 for partial
  * (probably a mouse sequence but need more data).   * (probably a mouse sequence but need more data), -2 if an invalid mouse
    * sequence.
  */   */
 static int  static int
 tty_keys_mouse(struct tty *tty, const char *buf, size_t len, size_t *size,  tty_keys_mouse(struct tty *tty, const char *buf, size_t len, size_t *size,
Line 1069 
Line 1070 
                 if (b < MOUSE_PARAM_BTN_OFF ||                  if (b < MOUSE_PARAM_BTN_OFF ||
                     x < MOUSE_PARAM_POS_OFF ||                      x < MOUSE_PARAM_POS_OFF ||
                     y < MOUSE_PARAM_POS_OFF)                      y < MOUSE_PARAM_POS_OFF)
                         return (-1);                          return (-2);
                 b -= MOUSE_PARAM_BTN_OFF;                  b -= MOUSE_PARAM_BTN_OFF;
                 x -= MOUSE_PARAM_POS_OFF;                  x -= MOUSE_PARAM_POS_OFF;
                 y -= MOUSE_PARAM_POS_OFF;                  y -= MOUSE_PARAM_POS_OFF;
Line 1111 
Line 1112 
   
                 /* Check and return the mouse input. */                  /* Check and return the mouse input. */
                 if (x < 1 || y < 1)                  if (x < 1 || y < 1)
                         return (-1);                          return (-2);
                 x--;                  x--;
                 y--;                  y--;
                 b = sgr_b;                  b = sgr_b;

Legend:
Removed from v.1.165  
changed lines
  Added in v.1.166