summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-04-10 15:53:30 +0000
committermillert <millert@openbsd.org>2003-04-10 15:53:30 +0000
commitd51045ce840a2a7115cd500ebf37f73aa200f039 (patch)
treeb5e326e2688af5e55da028724a45a6364a9e8080
parentProper use of bus_space makes the need for <machine/pio.h> obsolete, which (diff)
downloadwireguard-openbsd-d51045ce840a2a7115cd500ebf37f73aa200f039.tar.xz
wireguard-openbsd-d51045ce840a2a7115cd500ebf37f73aa200f039.zip
Only print the "helpful" prompt in -d mode if there is room on the
bottom line for it. Closes PR 3189.
-rw-r--r--usr.bin/less/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/less/command.c b/usr.bin/less/command.c
index f3548e8c060..fca0f7bec13 100644
--- a/usr.bin/less/command.c
+++ b/usr.bin/less/command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: command.c,v 1.4 2001/11/19 19:02:14 mpech Exp $ */
+/* $OpenBSD: command.c,v 1.5 2003/04/10 15:53:30 millert Exp $ */
/*
* Copyright (c) 1984,1985,1989,1994,1995 Mark Nudelman
@@ -471,7 +471,7 @@ prompt()
{
so_enter();
putstr(p);
- if (be_helpful)
+ if (be_helpful && strlen(p) + 40 < sc_width)
putstr(" [Press space to continue, 'q' to quit.]");
so_exit();
}