mirror of
https://github.com/tmux/tmux.git
synced 2026-06-21 17:55:21 +00:00
Minor tidying.
This commit is contained in:
@@ -236,7 +236,7 @@ struct redraw_draw_ctx {
|
|||||||
|
|
||||||
/* Make redraw flags into a string. */
|
/* Make redraw flags into a string. */
|
||||||
static const char *
|
static const char *
|
||||||
redraw_flags_string(int flags)
|
redraw_flags_to_string(int flags)
|
||||||
{
|
{
|
||||||
static char s[128];
|
static char s[128];
|
||||||
|
|
||||||
@@ -321,21 +321,22 @@ static int
|
|||||||
redraw_window_to_scene(struct redraw_build_ctx *bctx, int wx, int wy,
|
redraw_window_to_scene(struct redraw_build_ctx *bctx, int wx, int wy,
|
||||||
u_int *x, u_int *y)
|
u_int *x, u_int *y)
|
||||||
{
|
{
|
||||||
|
int sx, sy;
|
||||||
|
|
||||||
if (wx < 0 || wy < 0)
|
if (wx < 0 || wy < 0)
|
||||||
return (0);
|
return (0);
|
||||||
if ((u_int)wx > bctx->w->sx || (u_int)wy > bctx->w->sy)
|
if ((u_int)wx > bctx->w->sx || (u_int)wy > bctx->w->sy)
|
||||||
return (0);
|
return (0);
|
||||||
if (wx < (int)bctx->ox || wy < (int)bctx->oy)
|
if (wx < (int)bctx->ox || wy < (int)bctx->oy)
|
||||||
return (0);
|
return (0);
|
||||||
wx -= bctx->ox;
|
|
||||||
wy -= bctx->oy;
|
|
||||||
|
|
||||||
if (wx < 0 || wy < 0)
|
sx = wx - (int)bctx->ox;
|
||||||
|
sy = wy - (int)bctx->oy;
|
||||||
|
|
||||||
|
if ((u_int)sx >= bctx->sx || (u_int)sy >= bctx->sy)
|
||||||
return (0);
|
return (0);
|
||||||
if ((u_int)wx >= bctx->sx || (u_int)wy >= bctx->sy)
|
*x = sx;
|
||||||
return (0);
|
*y = sy;
|
||||||
*x = wx;
|
|
||||||
*y = wy;
|
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1538,7 +1539,7 @@ redraw_draw(struct client *c, struct window_pane *wp, int flags)
|
|||||||
|
|
||||||
if (log_get_level() != 0) {
|
if (log_get_level() != 0) {
|
||||||
log_debug("%s: starting @%u redraw (%s)", c->name, w->id,
|
log_debug("%s: starting @%u redraw (%s)", c->name, w->id,
|
||||||
redraw_flags_string(flags));
|
redraw_flags_to_string(flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
scene = redraw_get_scene(c);
|
scene = redraw_get_scene(c);
|
||||||
|
|||||||
Reference in New Issue
Block a user