mirror of
https://github.com/tmux/tmux.git
synced 2025-04-21 11:58:48 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
2cbca7ce16
@ -1535,6 +1535,7 @@ focused:
|
|||||||
static void
|
static void
|
||||||
server_client_reset_state(struct client *c)
|
server_client_reset_state(struct client *c)
|
||||||
{
|
{
|
||||||
|
struct tty *tty = &c->tty;
|
||||||
struct window *w = c->session->curw->window;
|
struct window *w = c->session->curw->window;
|
||||||
struct window_pane *wp = w->active, *loop;
|
struct window_pane *wp = w->active, *loop;
|
||||||
struct screen *s;
|
struct screen *s;
|
||||||
@ -1545,6 +1546,10 @@ server_client_reset_state(struct client *c)
|
|||||||
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
|
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* Disable the block flag. */
|
||||||
|
flags = (tty->flags & TTY_BLOCK);
|
||||||
|
tty->flags &= ~TTY_BLOCK;
|
||||||
|
|
||||||
/* Get mode from overlay if any, else from screen. */
|
/* Get mode from overlay if any, else from screen. */
|
||||||
if (c->overlay_draw != NULL) {
|
if (c->overlay_draw != NULL) {
|
||||||
s = NULL;
|
s = NULL;
|
||||||
@ -1559,13 +1564,13 @@ server_client_reset_state(struct client *c)
|
|||||||
log_debug("%s: client %s mode %x", __func__, c->name, mode);
|
log_debug("%s: client %s mode %x", __func__, c->name, mode);
|
||||||
|
|
||||||
/* Reset region and margin. */
|
/* Reset region and margin. */
|
||||||
tty_region_off(&c->tty);
|
tty_region_off(tty);
|
||||||
tty_margin_off(&c->tty);
|
tty_margin_off(tty);
|
||||||
|
|
||||||
/* Move cursor to pane cursor and offset. */
|
/* Move cursor to pane cursor and offset. */
|
||||||
if (c->overlay_draw == NULL) {
|
if (c->overlay_draw == NULL) {
|
||||||
cursor = 0;
|
cursor = 0;
|
||||||
tty_window_offset(&c->tty, &ox, &oy, &sx, &sy);
|
tty_window_offset(tty, &ox, &oy, &sx, &sy);
|
||||||
if (wp->xoff + s->cx >= ox && wp->xoff + s->cx <= ox + sx &&
|
if (wp->xoff + s->cx >= ox && wp->xoff + s->cx <= ox + sx &&
|
||||||
wp->yoff + s->cy >= oy && wp->yoff + s->cy <= oy + sy) {
|
wp->yoff + s->cy >= oy && wp->yoff + s->cy <= oy + sy) {
|
||||||
cursor = 1;
|
cursor = 1;
|
||||||
@ -1579,7 +1584,8 @@ server_client_reset_state(struct client *c)
|
|||||||
if (!cursor)
|
if (!cursor)
|
||||||
mode &= ~MODE_CURSOR;
|
mode &= ~MODE_CURSOR;
|
||||||
}
|
}
|
||||||
tty_cursor(&c->tty, cx, cy);
|
log_debug("%s: cursor to %u,%u", __func__, cx, cy);
|
||||||
|
tty_cursor(tty, cx, cy);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set mouse mode if requested. To support dragging, always use button
|
* Set mouse mode if requested. To support dragging, always use button
|
||||||
@ -1602,18 +1608,12 @@ server_client_reset_state(struct client *c)
|
|||||||
mode &= ~MODE_BRACKETPASTE;
|
mode &= ~MODE_BRACKETPASTE;
|
||||||
|
|
||||||
/* Set the terminal mode and reset attributes. */
|
/* Set the terminal mode and reset attributes. */
|
||||||
tty_update_mode(&c->tty, mode, s);
|
tty_update_mode(tty, mode, s);
|
||||||
tty_reset(&c->tty);
|
tty_reset(tty);
|
||||||
|
|
||||||
/*
|
/* All writing must be done, send a sync end (if it was started). */
|
||||||
* All writing must be done, send a sync end (if it was started). It
|
tty_sync_end(tty);
|
||||||
* may have been started by redrawing so needs to go out even if the
|
tty->flags |= flags;
|
||||||
* block flag is set.
|
|
||||||
*/
|
|
||||||
flags = (c->tty.flags & TTY_BLOCK);
|
|
||||||
c->tty.flags &= ~TTY_BLOCK;
|
|
||||||
tty_sync_end(&c->tty);
|
|
||||||
c->tty.flags |= flags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Repeat time callback. */
|
/* Repeat time callback. */
|
||||||
@ -1736,7 +1736,6 @@ server_client_check_redraw(struct client *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (~c->flags & CLIENT_REDRAWWINDOW) {
|
if (~c->flags & CLIENT_REDRAWWINDOW) {
|
||||||
c->redraw_panes = 0;
|
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (wp->flags & PANE_REDRAW) {
|
if (wp->flags & PANE_REDRAW) {
|
||||||
log_debug("%s: pane %%%u needs redraw",
|
log_debug("%s: pane %%%u needs redraw",
|
||||||
@ -1782,6 +1781,7 @@ server_client_check_redraw(struct client *c)
|
|||||||
tty_update_mode(tty, mode, NULL);
|
tty_update_mode(tty, mode, NULL);
|
||||||
screen_redraw_pane(c, wp);
|
screen_redraw_pane(c, wp);
|
||||||
}
|
}
|
||||||
|
c->redraw_panes = 0;
|
||||||
c->flags &= ~CLIENT_REDRAWPANES;
|
c->flags &= ~CLIENT_REDRAWPANES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ static struct tty_feature tty_feature_clipboard = {
|
|||||||
* 256 palette.
|
* 256 palette.
|
||||||
*/
|
*/
|
||||||
static const char *tty_feature_rgb_capabilities[] = {
|
static const char *tty_feature_rgb_capabilities[] = {
|
||||||
|
"AX",
|
||||||
"setrgbf=\\E[38;2;%p1%d;%p2%d;%p3%dm",
|
"setrgbf=\\E[38;2;%p1%d;%p2%d;%p3%dm",
|
||||||
"setrgbb=\\E[48;2;%p1%d;%p2%d;%p3%dm",
|
"setrgbb=\\E[48;2;%p1%d;%p2%d;%p3%dm",
|
||||||
"setab=\\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
"setab=\\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||||
@ -88,6 +89,7 @@ static struct tty_feature tty_feature_rgb = {
|
|||||||
|
|
||||||
/* Terminal supports 256 colours. */
|
/* Terminal supports 256 colours. */
|
||||||
static const char *tty_feature_256_capabilities[] = {
|
static const char *tty_feature_256_capabilities[] = {
|
||||||
|
"AX",
|
||||||
"setab=\\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
"setab=\\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||||
"setaf=\\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
"setaf=\\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||||
NULL
|
NULL
|
||||||
|
1
tty.c
1
tty.c
@ -1491,6 +1491,7 @@ tty_write(void (*cmdfn)(struct tty *, const struct tty_ctx *),
|
|||||||
* Redraw is already deferred to redraw another pane -
|
* Redraw is already deferred to redraw another pane -
|
||||||
* redraw this one also when that happens.
|
* redraw this one also when that happens.
|
||||||
*/
|
*/
|
||||||
|
log_debug("adding %%%u to deferred redraw", wp->id);
|
||||||
wp->flags |= PANE_REDRAW;
|
wp->flags |= PANE_REDRAW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user