line[count++] = BtnCode(event, screen->mouse_button) + 32;
line[count++] = BtnCode(event, screen->mouse_button);
EditorButton(register XButtonEvent *event){	TScreen *screen = &term->screen;	int pty = screen->respond;	Char line[6];	int row, col;	int button, count = 0;	/* If button event, get button # adjusted for DEC compatibility */	button = event->button - 1;	/* Compute character position of mouse pointer */	row = (event->y - screen->border) / FontHeight(screen);	col = (event->x - OriginX(screen)) / FontWidth(screen);	/* Limit to screen dimensions */	if (row < 0)		row = 0;	else if (row > screen->max_row)		row = screen->max_row;	else if (row > MOUSE_LIMIT)		row = MOUSE_LIMIT;	if (col < 0)		col = 0;	else if (col > screen->max_col)		col = screen->max_col;	else if (col > MOUSE_LIMIT)		col = MOUSE_LIMIT;	/* Build key sequence starting with \E[M */	if (screen->control_eight_bits) {		line[count++] = CSI;	} else {		line[count++] = ESC;		line[count++] = '[';	}	line[count++] = 'M';	/* Add event code to key sequence */	if (screen->send_mouse_pos == X10_MOUSE) {		line[count++] = ' ' + button;	}	else	{	    /* Button-Motion events */	    switch(event->type)	    {	    case ButtonPress:		line[count++] = BtnCode(event, screen->mouse_button = button);		break;	    case ButtonRelease:		line[count++] = BtnCode(event, screen->mouse_button = -1);		break;	    case MotionNotify:		/* BTN_EVENT_MOUSE and ANY_EVENT_MOUSE modes send motion		 * events only if character cell has changed.		 */		if ((row == screen->mouse_row)		 && (col == screen->mouse_col))			return;		line[count++] = BtnCode(event, screen->mouse_button) + 32;		break;	    default:		return;	    }	}	screen->mouse_row = row;	screen->mouse_col = col;	/* Add pointer position to key sequence */	line[count++] = ' ' + col + 1;	line[count++] = ' ' + row + 1;	/* Transmit key sequence to process running under xterm */	v_write(pty, (char *)line, count);}