summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/grid.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-05-12 13:00:56 +0000
committernicm <nicm@openbsd.org>2017-05-12 13:00:56 +0000
commit6d5c64a026683c48d76dcdd3c69d77359fb3715e (patch)
tree181a7d4d7c050707cdae20bc6ddb148793441a1f /usr.bin/tmux/grid.c
parentRegions can't be smaller than 2 so don't try to clear them by scrolling if so. (diff)
downloadwireguard-openbsd-6d5c64a026683c48d76dcdd3c69d77359fb3715e.tar.xz
wireguard-openbsd-6d5c64a026683c48d76dcdd3c69d77359fb3715e.zip
Scrolling needs to use background colour.
Diffstat (limited to 'usr.bin/tmux/grid.c')
-rw-r--r--usr.bin/tmux/grid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c
index 7e9c3b6ed33..26efbc56163 100644
--- a/usr.bin/tmux/grid.c
+++ b/usr.bin/tmux/grid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grid.c,v 1.70 2017/04/25 18:20:51 nicm Exp $ */
+/* $OpenBSD: grid.c,v 1.71 2017/05/12 13:00:56 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -284,7 +284,7 @@ grid_clear_history(struct grid *gd)
/* Scroll a region up, moving the top line into the history. */
void
-grid_scroll_history_region(struct grid *gd, u_int upper, u_int lower)
+grid_scroll_history_region(struct grid *gd, u_int upper, u_int lower, u_int bg)
{
struct grid_line *gl_history, *gl_upper, *gl_lower;
u_int yy;
@@ -309,7 +309,7 @@ grid_scroll_history_region(struct grid *gd, u_int upper, u_int lower)
/* Then move the region up and clear the bottom line. */
memmove(gl_upper, gl_upper + 1, (lower - upper) * sizeof *gl_upper);
- memset(gl_lower, 0, sizeof *gl_lower);
+ grid_empty_line(gd, lower, bg);
/* Move the history offset down over the line. */
gd->hscrolled++;