mirror of
https://github.com/tmux/tmux.git
synced 2026-06-20 09:25:12 +00:00
Rename window_pane_visible to match other functions, from Dane Jensen.
This commit is contained in:
@@ -264,7 +264,7 @@ cmd_display_panes_draw(struct client *c, __unused void *data,
|
|||||||
log_debug("%s: %s @%u", __func__, c->name, w->id);
|
log_debug("%s: %s @%u", __func__, c->name, w->id);
|
||||||
|
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (window_pane_visible(wp))
|
if (window_pane_is_visible(wp))
|
||||||
cmd_display_panes_draw_pane(ctx, wp);
|
cmd_display_panes_draw_pane(ctx, wp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args_has(args, 'm') || args_has(args, 'M')) {
|
if (args_has(args, 'm') || args_has(args, 'M')) {
|
||||||
if (args_has(args, 'm') && !window_pane_visible(wp))
|
if (args_has(args, 'm') && !window_pane_is_visible(wp))
|
||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
if (server_check_marked())
|
if (server_check_marked())
|
||||||
lastwp = marked_pane.wp;
|
lastwp = marked_pane.wp;
|
||||||
|
|||||||
@@ -807,7 +807,7 @@ input_key_mouse(struct window_pane *wp, struct mouse_event *m)
|
|||||||
return;
|
return;
|
||||||
if (cmd_mouse_at(wp, m, &x, &y, 0) != 0)
|
if (cmd_mouse_at(wp, m, &x, &y, 0) != 0)
|
||||||
return;
|
return;
|
||||||
if (!window_pane_visible(wp))
|
if (!window_pane_is_visible(wp))
|
||||||
return;
|
return;
|
||||||
if (!input_key_get_mouse(s, m, x, y, &buf, &len))
|
if (!input_key_get_mouse(s, m, x, y, &buf, &len))
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ screen_redraw_cell_border(struct screen_redraw_ctx *ctx, struct window_pane *wp,
|
|||||||
* single z-index.
|
* single z-index.
|
||||||
*/
|
*/
|
||||||
TAILQ_FOREACH(wp2, &w->z_index, zentry) {
|
TAILQ_FOREACH(wp2, &w->z_index, zentry) {
|
||||||
if (!window_pane_visible(wp2) || window_pane_is_floating(wp2))
|
if (!window_pane_is_visible(wp2) || window_pane_is_floating(wp2))
|
||||||
continue;
|
continue;
|
||||||
n = screen_redraw_cell_border1(ctx, sb_pos, sb_w, wp2, px, py);
|
n = screen_redraw_cell_border1(ctx, sb_pos, sb_w, wp2, px, py);
|
||||||
if (n != -1)
|
if (n != -1)
|
||||||
@@ -493,7 +493,7 @@ screen_redraw_check_cell(struct screen_redraw_ctx *ctx, int px, int py,
|
|||||||
if (!window_pane_is_floating(wp))
|
if (!window_pane_is_floating(wp))
|
||||||
tiled_only = 1;
|
tiled_only = 1;
|
||||||
do { /* loop until back to wp == start */
|
do { /* loop until back to wp == start */
|
||||||
if (!window_pane_visible(wp))
|
if (!window_pane_is_visible(wp))
|
||||||
goto next;
|
goto next;
|
||||||
if (tiled_only && window_pane_is_floating(wp))
|
if (tiled_only && window_pane_is_floating(wp))
|
||||||
goto next;
|
goto next;
|
||||||
@@ -692,7 +692,7 @@ screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx)
|
|||||||
log_debug("%s: %s @%u", __func__, c->name, w->id);
|
log_debug("%s: %s @%u", __func__, c->name, w->id);
|
||||||
|
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (!window_pane_visible(wp))
|
if (!window_pane_is_visible(wp))
|
||||||
continue;
|
continue;
|
||||||
s = &wp->status_screen;
|
s = &wp->status_screen;
|
||||||
|
|
||||||
@@ -866,7 +866,7 @@ screen_redraw_pane(struct client *c, struct window_pane *wp,
|
|||||||
{
|
{
|
||||||
struct screen_redraw_ctx ctx;
|
struct screen_redraw_ctx ctx;
|
||||||
|
|
||||||
if (!window_pane_visible(wp))
|
if (!window_pane_is_visible(wp))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
screen_redraw_set_context(c, &ctx);
|
screen_redraw_set_context(c, &ctx);
|
||||||
@@ -1101,7 +1101,7 @@ screen_redraw_draw_panes(struct screen_redraw_ctx *ctx)
|
|||||||
log_debug("%s: %s @%u", __func__, c->name, w->id);
|
log_debug("%s: %s @%u", __func__, c->name, w->id);
|
||||||
|
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (window_pane_visible(wp))
|
if (window_pane_is_visible(wp))
|
||||||
screen_redraw_draw_pane(ctx, wp);
|
screen_redraw_draw_pane(ctx, wp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1221,7 +1221,7 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, int px,
|
|||||||
bb = wp->yoff + (int)wp->sy;
|
bb = wp->yoff + (int)wp->sy;
|
||||||
}
|
}
|
||||||
if (!found_self ||
|
if (!found_self ||
|
||||||
!window_pane_visible(wp) ||
|
!window_pane_is_visible(wp) ||
|
||||||
py < tb ||
|
py < tb ||
|
||||||
py > bb)
|
py > bb)
|
||||||
continue;
|
continue;
|
||||||
@@ -1447,7 +1447,7 @@ screen_redraw_draw_pane_scrollbars(struct screen_redraw_ctx *ctx)
|
|||||||
|
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (window_pane_show_scrollbar(wp, ctx->pane_scrollbars) &&
|
if (window_pane_show_scrollbar(wp, ctx->pane_scrollbars) &&
|
||||||
window_pane_visible(wp))
|
window_pane_is_visible(wp))
|
||||||
screen_redraw_draw_pane_scrollbar(ctx, wp);
|
screen_redraw_draw_pane_scrollbar(ctx, wp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
tmux.h
2
tmux.h
@@ -3446,7 +3446,7 @@ int window_pane_key(struct window_pane *, struct client *,
|
|||||||
struct mouse_event *);
|
struct mouse_event *);
|
||||||
void window_pane_paste(struct window_pane *, key_code, char *,
|
void window_pane_paste(struct window_pane *, key_code, char *,
|
||||||
size_t);
|
size_t);
|
||||||
int window_pane_visible(struct window_pane *);
|
int window_pane_is_visible(struct window_pane *);
|
||||||
int window_pane_exited(struct window_pane *);
|
int window_pane_exited(struct window_pane *);
|
||||||
u_int window_pane_search(struct window_pane *, const char *, int,
|
u_int window_pane_search(struct window_pane *, const char *, int,
|
||||||
int);
|
int);
|
||||||
|
|||||||
10
window.c
10
window.c
@@ -635,7 +635,7 @@ window_get_active_at(struct window *w, u_int x, u_int y)
|
|||||||
* bottom border.
|
* bottom border.
|
||||||
*/
|
*/
|
||||||
TAILQ_FOREACH(wp, &w->z_index, zentry) {
|
TAILQ_FOREACH(wp, &w->z_index, zentry) {
|
||||||
if (!window_pane_visible(wp) ||
|
if (!window_pane_is_visible(wp) ||
|
||||||
window_pane_is_floating(wp))
|
window_pane_is_floating(wp))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -649,7 +649,7 @@ window_get_active_at(struct window *w, u_int x, u_int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TAILQ_FOREACH(wp, &w->z_index, zentry) {
|
TAILQ_FOREACH(wp, &w->z_index, zentry) {
|
||||||
if (!window_pane_visible(wp))
|
if (!window_pane_is_visible(wp))
|
||||||
continue;
|
continue;
|
||||||
window_pane_full_size_offset(wp, &xoff, &yoff, &sx, &sy);
|
window_pane_full_size_offset(wp, &xoff, &yoff, &sx, &sy);
|
||||||
if (!window_pane_is_floating(wp)) {
|
if (!window_pane_is_floating(wp)) {
|
||||||
@@ -1352,7 +1352,7 @@ window_pane_copy_paste(struct window_pane *wp, char *buf, size_t len)
|
|||||||
TAILQ_EMPTY(&loop->modes) &&
|
TAILQ_EMPTY(&loop->modes) &&
|
||||||
loop->fd != -1 &&
|
loop->fd != -1 &&
|
||||||
(~loop->flags & PANE_INPUTOFF) &&
|
(~loop->flags & PANE_INPUTOFF) &&
|
||||||
window_pane_visible(loop) &&
|
window_pane_is_visible(loop) &&
|
||||||
options_get_number(loop->options, "synchronize-panes")) {
|
options_get_number(loop->options, "synchronize-panes")) {
|
||||||
log_debug("%s: %.*s", __func__, (int)len, buf);
|
log_debug("%s: %.*s", __func__, (int)len, buf);
|
||||||
bufferevent_write(loop->event, buf, len);
|
bufferevent_write(loop->event, buf, len);
|
||||||
@@ -1370,7 +1370,7 @@ window_pane_copy_key(struct window_pane *wp, key_code key)
|
|||||||
TAILQ_EMPTY(&loop->modes) &&
|
TAILQ_EMPTY(&loop->modes) &&
|
||||||
loop->fd != -1 &&
|
loop->fd != -1 &&
|
||||||
(~loop->flags & PANE_INPUTOFF) &&
|
(~loop->flags & PANE_INPUTOFF) &&
|
||||||
window_pane_visible(loop) &&
|
window_pane_is_visible(loop) &&
|
||||||
options_get_number(loop->options, "synchronize-panes"))
|
options_get_number(loop->options, "synchronize-panes"))
|
||||||
input_key_pane(loop, key, NULL);
|
input_key_pane(loop, key, NULL);
|
||||||
}
|
}
|
||||||
@@ -1427,7 +1427,7 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
window_pane_visible(struct window_pane *wp)
|
window_pane_is_visible(struct window_pane *wp)
|
||||||
{
|
{
|
||||||
if (~wp->window->flags & WINDOW_ZOOMED)
|
if (~wp->window->flags & WINDOW_ZOOMED)
|
||||||
return (1);
|
return (1);
|
||||||
|
|||||||
Reference in New Issue
Block a user