summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2021-12-07 09:52:59 +0000
committerThomas Adam <thomas@xteddy.org>2021-12-07 09:52:59 +0000
commit138ffc7cb6225b8a6d54d771b0112635f0dbb42e (patch)
tree289b9f8c4ca207f92b6d81f9511c520969241120 /server-client.c
parentef676e1202a4d5c423d5bba2f8ecba1f768d8364 (diff)
parentd721fb2a9fd70c157abb8540d4c50fca654f9f4d (diff)
Merge branch 'obsd-master' into master
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/server-client.c b/server-client.c
index be4d1861..06154be7 100644
--- a/server-client.c
+++ b/server-client.c
@@ -1703,7 +1703,7 @@ server_client_reset_state(struct client *c)
struct window_pane *wp = server_client_get_pane(c), *loop;
struct screen *s = NULL;
struct options *oo = c->session->options;
- int mode = 0, cursor, flags;
+ int mode = 0, cursor, flags, n;
u_int cx = 0, cy = 0, ox, oy, sx, sy;
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
@@ -1731,7 +1731,20 @@ server_client_reset_state(struct client *c)
tty_margin_off(tty);
/* Move cursor to pane cursor and offset. */
- if (c->overlay_draw == NULL) {
+ if (c->prompt_string != NULL) {
+ n = options_get_number(c->session->options, "status-position");
+ if (n == 0)
+ cy = 0;
+ else {
+ n = status_line_size(c);
+ if (n == 0)
+ cy = tty->sy - 1;
+ else
+ cy = tty->sy - n;
+ }
+ cx = c->prompt_cursor;
+ mode &= ~MODE_CURSOR;
+ } else if (c->overlay_draw == NULL) {
cursor = 0;
tty_window_offset(tty, &ox, &oy, &sx, &sy);
if (wp->xoff + s->cx >= ox && wp->xoff + s->cx <= ox + sx &&