mirror of
https://github.com/tmux/tmux.git
synced 2024-12-25 19:08:58 +00:00
Merge branch 'obsd-master' into master
This commit is contained in:
commit
60cacdffea
@ -72,7 +72,7 @@ cmd_confirm_before_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
int wait = !args_has(args, 'b');
|
int wait = !args_has(args, 'b');
|
||||||
|
|
||||||
cdata = xcalloc(1, sizeof *cdata);
|
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)
|
if (cdata->cmdlist == NULL)
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
|
|
||||||
|
@ -513,7 +513,7 @@ server_client_detach(struct client *c, enum msgtype msgtype)
|
|||||||
{
|
{
|
||||||
struct session *s = c->session;
|
struct session *s = c->session;
|
||||||
|
|
||||||
if (s == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS))
|
if (s == NULL || (c->flags & CLIENT_NODETACHFLAGS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
c->flags |= CLIENT_EXIT;
|
c->flags |= CLIENT_EXIT;
|
||||||
|
3
tmux.h
3
tmux.h
@ -1711,6 +1711,9 @@ struct client {
|
|||||||
(CLIENT_DEAD| \
|
(CLIENT_DEAD| \
|
||||||
CLIENT_SUSPENDED| \
|
CLIENT_SUSPENDED| \
|
||||||
CLIENT_EXIT)
|
CLIENT_EXIT)
|
||||||
|
#define CLIENT_NODETACHFLAGS \
|
||||||
|
(CLIENT_DEAD| \
|
||||||
|
CLIENT_EXIT)
|
||||||
#define CLIENT_NOSIZEFLAGS \
|
#define CLIENT_NOSIZEFLAGS \
|
||||||
(CLIENT_DEAD| \
|
(CLIENT_DEAD| \
|
||||||
CLIENT_SUSPENDED| \
|
CLIENT_SUSPENDED| \
|
||||||
|
16
tty.c
16
tty.c
@ -2278,17 +2278,25 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
|
|||||||
if (tty->flags & TTY_BLOCK)
|
if (tty->flags & TTY_BLOCK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (cx > tty->sx - 1)
|
|
||||||
cx = tty->sx - 1;
|
|
||||||
|
|
||||||
thisx = tty->cx;
|
thisx = tty->cx;
|
||||||
thisy = tty->cy;
|
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. */
|
/* No change. */
|
||||||
if (cx == thisx && cy == thisy)
|
if (cx == thisx && cy == thisy)
|
||||||
return;
|
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)
|
if (thisx > tty->sx - 1)
|
||||||
goto absolute;
|
goto absolute;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user