diff --git a/server-client.c b/server-client.c index e0a9d08b8..c25c7ca19 100644 --- a/server-client.c +++ b/server-client.c @@ -2052,19 +2052,18 @@ server_client_reset_state(struct client *c) if (!window_position_is_visible(r, cx)) cursor = 0; - if (window_pane_scrollbar_overlay_visible(wp)) { - sb_w = wp->scrollbar_style.width; - if (sb_w > wp->sx) - sb_w = wp->sx; - if (sb_w != 0 && - w->sb_pos == - PANE_SCROLLBARS_LEFT) { - if (s->cx < sb_w) + if (window_pane_scrollbar_overlay_visible(wp)) { + sb_w = wp->scrollbar_style.width; + if (sb_w > wp->sx) + sb_w = wp->sx; + if (sb_w != 0 && + w->sb_pos == PANE_SCROLLBARS_LEFT) { + if (s->cx < sb_w) + cursor = 0; + } else if (sb_w != 0 && + s->cx >= wp->sx - sb_w) cursor = 0; - } else if (sb_w != 0 && - s->cx >= wp->sx - sb_w) - cursor = 0; - } + } if (status_at_line(c) == 0) cy += status_line_size(c);