Fix a bug where you couldn't start top in a very small window. Now

you can start it in a small window, but it doesn't always display
anything sensible. Resizing the window does work though.

The patch is a slightly simpler one than Sheldon's in the PR.

PR:		21075
This commit is contained in:
David Malone 2002-08-11 18:37:25 +00:00
parent 9ed6ae76c7
commit 1b39d8a298
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=101692

View File

@ -102,6 +102,8 @@ int display_resize()
/* if operating in "dumb" mode, we only need one line */
lines = smart_terminal ? screen_length - Header_lines : 1;
if (lines < 0)
lines = 0;
/* we don't want more than MAX_COLS columns, since the machine-dependent
modules make static allocations based on MAX_COLS and we don't want
to run off the end of their buffers */