From 04c6db2d0f7bca4bc6b31afd5a5cb4512b5f915b Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 26 Sep 2018 16:42:29 +0100 Subject: [PATCH] Revert "Add a B flag to mark windows bigger than the client." This reverts commit b4e74f4310d90affd4e1a4a7328082ac4beb5461. --- cmd-select-pane.c | 7 +++---- tmux.1 | 1 - tmux.h | 4 ++-- tty.c | 3 ++- window.c | 4 +--- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/cmd-select-pane.c b/cmd-select-pane.c index 34b0a3c3..5cec82f2 100644 --- a/cmd-select-pane.c +++ b/cmd-select-pane.c @@ -58,7 +58,6 @@ static void cmd_select_pane_redraw(struct window *w) { struct client *c; - struct window *loop; /* * Redraw entire window if it is bigger than the client (the @@ -68,15 +67,15 @@ cmd_select_pane_redraw(struct window *w) TAILQ_FOREACH(c, &clients, entry) { if (c->session == NULL) continue; - loop = c->session->curw->window; - if (loop == w && tty_window_bigger(&c->tty, w)) + if (c->session->curw->window == w && tty_window_bigger(&c->tty)) server_redraw_client(c); else { - if (loop == w) + if (c->session->curw->window == w) c->flags |= CLIENT_REDRAWBORDERS; if (session_has(c->session, w)) c->flags |= CLIENT_REDRAWSTATUS; } + } } diff --git a/tmux.1 b/tmux.1 index 15904010..a85ff7a5 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4095,7 +4095,6 @@ The flag is one of the following symbols appended to the window name: .It Li "#" Ta "Window activity is monitored and activity has been detected." .It Li "\&!" Ta "Window bells are monitored and a bell has occurred in the window." .It Li "~" Ta "The window has been silent for the monitor-silence interval." -.It Li "+" Ta "The window is larger than is visible." .It Li "M" Ta "The window contains the marked pane." .It Li "Z" Ta "The window's active pane is zoomed." .El diff --git a/tmux.h b/tmux.h index be74a3a7..22fb80a4 100644 --- a/tmux.h +++ b/tmux.h @@ -1666,7 +1666,7 @@ struct environ *environ_for_session(struct session *, int); /* tty.c */ void tty_create_log(void); -int tty_window_bigger(struct tty *, struct window *); +int tty_window_bigger(struct tty *); int tty_window_offset(struct tty *, u_int *, u_int *, u_int *, u_int *); void tty_update_window_offset(struct window *); void tty_update_client_offset(struct client *); @@ -2181,7 +2181,7 @@ void window_pane_key(struct window_pane *, struct client *, struct session *, key_code, struct mouse_event *); int window_pane_visible(struct window_pane *); u_int window_pane_search(struct window_pane *, const char *); -const char *window_printable_flags(struct winlink *, struct client *); +const char *window_printable_flags(struct winlink *); struct window_pane *window_pane_find_up(struct window_pane *); struct window_pane *window_pane_find_down(struct window_pane *); struct window_pane *window_pane_find_left(struct window_pane *); diff --git a/tty.c b/tty.c index 00f58d1c..7e52755c 100644 --- a/tty.c +++ b/tty.c @@ -701,9 +701,10 @@ tty_repeat_space(struct tty *tty, u_int n) /* Is this window bigger than the terminal? */ int -tty_window_bigger(struct tty *tty, struct window *w) +tty_window_bigger(struct tty *tty) { struct client *c = tty->client; + struct window *w = c->session->curw->window; return (tty->sx < w->sx || tty->sy - status_line_size(c) < w->sy); } diff --git a/window.c b/window.c index ed76e7f4..7d3b0748 100644 --- a/window.c +++ b/window.c @@ -739,7 +739,7 @@ window_destroy_panes(struct window *w) } const char * -window_printable_flags(struct winlink *wl, struct client *c) +window_printable_flags(struct winlink *wl) { struct session *s = wl->session; static char flags[32]; @@ -760,8 +760,6 @@ window_printable_flags(struct winlink *wl, struct client *c) flags[pos++] = 'M'; if (wl->window->flags & WINDOW_ZOOMED) flags[pos++] = 'Z'; - if (c != NULL && tty_window_bigger(&c->tty, wl->window)) - flags[pos++] = '+'; flags[pos] = '\0'; return (flags); }