curses text windows

Most of the entries for '?' looked awful because curses was using
((terminal_width / 2) - 2) for the window width ('- 2' was to make
for for a border around the popup window, regardless of what the
'windowborder' option was set to).  Splitting text that has been
manually formatted for 80 columns "worked" but looked bad when not
required.

Some of the help files are using 79 characters on a few lines,
producing wrapped text when displayed.  Those would look better if
limited them to 78 or if curses can be modified to suppress the
window border when the entire display is being covered by a popup.
This commit is contained in:
PatR
2019-06-20 01:14:50 -07:00
parent 3ea0cc1483
commit 9f6588af49
2 changed files with 7 additions and 3 deletions
+5 -2
View File
@@ -1025,8 +1025,11 @@ menu_win_size(nhmenu *menu)
/* Try not to wrap headers/normal text lines if possible. We can
go wider than half the screen for this purpose if need be */
if ((maxheaderwidth > maxwidth) && (maxheaderwidth < (term_cols - 2))) {
maxwidth = maxheaderwidth;
if (maxheaderwidth > maxwidth) {
if (maxheaderwidth < (term_cols - 2))
maxwidth = maxheaderwidth;
else
maxwidth = term_cols - 2;
}
width = maxwidth;