Revert "Add a B flag to mark windows bigger than the client."

This reverts commit b4e74f4310.
pull/1495/head
Nicholas Marriott 2018-09-26 16:42:29 +01:00
parent 6abb62df1e
commit 04c6db2d0f
5 changed files with 8 additions and 11 deletions

View File

@ -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;
}
}
}

1
tmux.1
View File

@ -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

4
tmux.h
View File

@ -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 *);

3
tty.c
View File

@ -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);
}

View File

@ -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);
}