Merge branch 'obsd-master' into master

pull/2958/head
Thomas Adam 2021-10-28 22:01:13 +01:00
commit 60cacdffea
4 changed files with 17 additions and 6 deletions

View File

@ -72,7 +72,7 @@ cmd_confirm_before_exec(struct cmd *self, struct cmdq_item *item)
int wait = !args_has(args, 'b');
cdata = xcalloc(1, sizeof *cdata);
cdata->cmdlist = args_make_commands_now(self, item, 0, 0);
cdata->cmdlist = args_make_commands_now(self, item, 0, 1);
if (cdata->cmdlist == NULL)
return (CMD_RETURN_ERROR);

View File

@ -513,7 +513,7 @@ server_client_detach(struct client *c, enum msgtype msgtype)
{
struct session *s = c->session;
if (s == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS))
if (s == NULL || (c->flags & CLIENT_NODETACHFLAGS))
return;
c->flags |= CLIENT_EXIT;

3
tmux.h
View File

@ -1711,6 +1711,9 @@ struct client {
(CLIENT_DEAD| \
CLIENT_SUSPENDED| \
CLIENT_EXIT)
#define CLIENT_NODETACHFLAGS \
(CLIENT_DEAD| \
CLIENT_EXIT)
#define CLIENT_NOSIZEFLAGS \
(CLIENT_DEAD| \
CLIENT_SUSPENDED| \

16
tty.c
View File

@ -2278,17 +2278,25 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
if (tty->flags & TTY_BLOCK)
return;
if (cx > tty->sx - 1)
cx = tty->sx - 1;
thisx = tty->cx;
thisy = tty->cy;
/*
* If in the automargin space, and want to be there, do not move.
* Otherwise, force the cursor to be in range (and complain).
*/
if (cx == thisx && cy == thisy && cx == tty->sx)
return;
if (cx > tty->sx - 1) {
log_debug("%s: x too big %u > %u", __func__, cx, tty->sx - 1);
cx = tty->sx - 1;
}
/* No change. */
if (cx == thisx && cy == thisy)
return;
/* Very end of the line, just use absolute movement. */
/* Currently at the very end of the line - use absolute movement. */
if (thisx > tty->sx - 1)
goto absolute;