Merge branch 'master' into floating_panes

This commit is contained in:
Nicholas Marriott
2026-05-12 12:38:31 +01:00
41 changed files with 1075 additions and 254 deletions

View File

@@ -41,6 +41,7 @@ static void server_client_check_redraw(struct client *);
static void server_client_check_modes(struct client *);
static void server_client_set_title(struct client *);
static void server_client_set_path(struct client *);
static void server_client_set_progress_bar(struct client *);
static void server_client_reset_state(struct client *);
static void server_client_update_latest(struct client *);
static void server_client_dispatch(struct imsg *, void *);
@@ -2142,6 +2143,7 @@ server_client_check_redraw(struct client *c)
server_client_set_title(c);
server_client_set_path(c);
}
server_client_set_progress_bar(c);
screen_redraw_screen(c);
}
@@ -2208,6 +2210,23 @@ server_client_set_path(struct client *c)
}
}
/* Set client progress bar. */
static void
server_client_set_progress_bar(struct client *c)
{
struct session *s = c->session;
struct progress_bar *pane_pb;
if (s->curw == NULL)
return;
pane_pb = &s->curw->window->active->base.progress_bar;
if (pane_pb->state == c->progress_bar.state &&
pane_pb->progress == c->progress_bar.progress)
return;
memcpy(&c->progress_bar, pane_pb, sizeof c->progress_bar);
tty_set_progress_bar(&c->tty, &c->progress_bar);
}
/* Dispatch message from client. */
static void
server_client_dispatch(struct imsg *imsg, void *arg)
@@ -2302,13 +2321,16 @@ server_client_dispatch(struct imsg *imsg, void *arg)
goto bad;
break;
case MSG_WRITE_READY:
file_write_ready(&c->files, imsg);
if (file_write_ready(&c->files, imsg) != 0)
goto bad;
break;
case MSG_READ:
file_read_data(&c->files, imsg);
if (file_read_data(&c->files, imsg) != 0)
goto bad;
break;
case MSG_READ_DONE:
file_read_done(&c->files, imsg);
if (file_read_done(&c->files, imsg) != 0)
goto bad;
break;
}