diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-04-10 15:53:31 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-04-10 15:53:31 +0000 |
commit | b689eef10c908c7aed3d01d2007a6bd1c24519e0 (patch) | |
tree | 5dde749d1fbc20e531b329bb49d54b2793d6c229 | |
parent | c8b4f9400f7d8ea72514ad5564c07a43bf2313e5 (diff) |
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.c | 4 |
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(); } |