summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-07-14 14:47:32 +0000
committernicm <nicm@openbsd.org>2009-07-14 14:47:32 +0000
commit3a12977228e3365e8c464f3b4abd4b6ed6f538a3 (patch)
tree11fa66b090b0d8f57cb663f4ee82bed3598847f8
parentdon't use both extern and static decls for a variable. (diff)
downloadwireguard-openbsd-3a12977228e3365e8c464f3b4abd4b6ed6f538a3.tar.xz
wireguard-openbsd-3a12977228e3365e8c464f3b4abd4b6ed6f538a3.zip
The scroll region cannot be one line only, ignore attempts to make it so.
-rw-r--r--usr.bin/tmux/screen-write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c
index 1b78e00c61a..bbe4f4023d0 100644
--- a/usr.bin/tmux/screen-write.c
+++ b/usr.bin/tmux/screen-write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-write.c,v 1.12 2009/07/09 17:57:11 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.13 2009/07/14 14:47:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -553,7 +553,7 @@ screen_write_scrollregion(
rupper = screen_size_y(s) - 1;
if (rlower > screen_size_y(s) - 1)
rlower = screen_size_y(s) - 1;
- if (rupper > rlower)
+ if (rupper >= rlower) /* cannot be one line */
return;
/* Cursor moves to top-left. */