summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/grid.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-03-19 13:46:10 +0000
committernicm <nicm@openbsd.org>2020-03-19 13:46:10 +0000
commit4bf7840fbfef91522aba25198250d73126f0399a (patch)
treec3980fe09708b19bc3e6ad632c4a232ae2ddfac4 /usr.bin/tmux/grid.c
parentAdd a flag to run a background process in a pty as well, not used for (diff)
downloadwireguard-openbsd-4bf7840fbfef91522aba25198250d73126f0399a.tar.xz
wireguard-openbsd-4bf7840fbfef91522aba25198250d73126f0399a.zip
Do not set the history flag if there is no history.
Diffstat (limited to 'usr.bin/tmux/grid.c')
-rw-r--r--usr.bin/tmux/grid.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c
index 3cebc7f42e9..5328795d7fe 100644
--- a/usr.bin/tmux/grid.c
+++ b/usr.bin/tmux/grid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grid.c,v 1.101 2019/12/03 10:47:22 nicm Exp $ */
+/* $OpenBSD: grid.c,v 1.102 2020/03/19 13:46:10 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -258,7 +258,10 @@ grid_create(u_int sx, u_int sy, u_int hlimit)
gd->sx = sx;
gd->sy = sy;
- gd->flags = GRID_HISTORY;
+ if (hlimit != 0)
+ gd->flags = GRID_HISTORY;
+ else
+ gd->flags = 0;
gd->hscrolled = 0;
gd->hsize = 0;