diff options
author | Thomas Adam <thomas@xteddy.org> | 2021-10-28 22:01:13 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2021-10-28 22:01:13 +0100 |
commit | 60cacdffea6683d53402660c51342125b8aab2b2 (patch) | |
tree | c5fc11d58f01d92b5964d728fe68175669af0d97 | |
parent | c77924bb56800c671d96aa64b887d1ddf033ad94 (diff) | |
parent | 4acad43013b7bb5f91103a68cfce591b1980ae17 (diff) | |
download | rtmux-60cacdffea6683d53402660c51342125b8aab2b2.tar.gz rtmux-60cacdffea6683d53402660c51342125b8aab2b2.tar.bz2 rtmux-60cacdffea6683d53402660c51342125b8aab2b2.zip |
Merge branch 'obsd-master' into master
-rw-r--r-- | cmd-confirm-before.c | 2 | ||||
-rw-r--r-- | server-client.c | 2 | ||||
-rw-r--r-- | tmux.h | 3 | ||||
-rw-r--r-- | tty.c | 16 |
4 files changed, 17 insertions, 6 deletions
diff --git a/cmd-confirm-before.c b/cmd-confirm-before.c index 95841962..ce8c95e0 100644 --- a/cmd-confirm-before.c +++ b/cmd-confirm-before.c @@ -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); diff --git a/server-client.c b/server-client.c index 03a24a8c..be4d1861 100644 --- a/server-client.c +++ b/server-client.c @@ -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; @@ -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| \ @@ -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; |