aboutsummaryrefslogtreecommitdiff
path: root/screen-write.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2015-12-11 19:59:08 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2015-12-11 19:59:08 +0000
commit5a5db02b8514eff40b97b3f3e4e85a3d948b57da (patch)
treeb365177fbccd29ab040ae598fa22a6bf2e10638d /screen-write.c
parent38cc1a1843b370eaeff749802d1d8803b73c4b93 (diff)
parent2a6b2153280278d356dfbdd2af36887d5a1c8763 (diff)
downloadrtmux-5a5db02b8514eff40b97b3f3e4e85a3d948b57da.tar.gz
rtmux-5a5db02b8514eff40b97b3f3e4e85a3d948b57da.tar.bz2
rtmux-5a5db02b8514eff40b97b3f3e4e85a3d948b57da.zip
Merge branch 'master' of github.com:tmux/tmux
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/screen-write.c b/screen-write.c
index 53067efe..e53d3799 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -767,8 +767,8 @@ screen_write_reverseindex(struct screen_write_ctx *ctx)
/* Set scroll region. */
void
-screen_write_scrollregion(
- struct screen_write_ctx *ctx, u_int rupper, u_int rlower)
+screen_write_scrollregion(struct screen_write_ctx *ctx, u_int rupper,
+ u_int rlower)
{
struct screen *s = ctx->s;
@@ -874,16 +874,16 @@ screen_write_clearscreen(struct screen_write_ctx *ctx)
{
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
+ u_int sx = screen_size_x(s);
+ u_int sy = screen_size_y(s);
screen_write_initctx(ctx, &ttyctx, 0);
/* Scroll into history if it is enabled. */
if (s->grid->flags & GRID_HISTORY)
grid_view_clear_history(s->grid);
- else {
- grid_view_clear(
- s->grid, 0, 0, screen_size_x(s), screen_size_y(s));
- }
+ else
+ grid_view_clear(s->grid, 0, 0, sx, sy);
tty_write(tty_cmd_clearscreen, &ttyctx);
}