Hi.
I used to run moc using a ~160x9/210x12 char terminal or so (160 columns, 9 lines), and this worked just fine.
Recently, I upgraded from Debian etch to testing (1:2.5.0~alpha3+svn20080629-2), and this "broke" moc, as it now complained about the terminal size being too small.
I tracked this down to the following commit fragment using rgrep and `svn blame`:
------------------------------------------------------------------------
r2062 | daper | 2008-02-10 17:00:29 +0200 (Sun, 10 Feb 2008) | 3 lines
Don't exit program if the terminal heught is below some limit, just print an
error message. (Niels Aan de Brugh)
------------------------------------------------------------------------
Index: interface_elements.c
===================================================================
--- interface_elements.c (revision 2061)
+++ interface_elements.c (revision 2062)
@@ -2252,10 +2273,9 @@
}
/* End the program if the terminal is too small. */
-static void check_term_size ()
+static void check_term_size (struct main_win *mw, struct info_win *iw)
{
- if (COLS < 79 || LINES < 7)
- interface_fatal ("The terminal is too small after resizeing.");
+ mw->too_small = iw->too_small = COLS < 59 || LINES < 17;
}
The commit message doesn't have any rationale for the change, and seems quite unrelated. Was this an inadvertent change, or was there some reason for raising the lines limit and lowering the columns limit?
In any case, mocp "breaks"/looks weird on a 59-column terminal now.
Find below a simple `svn diff` against trunk@r2150.
-- Tero Marttila
Index: interface_elements.c
===================================================================
--- interface_elements.c (revision 2150)
+++ interface_elements.c (working copy)
@@ -2356,7 +2356,7 @@
/* End the program if the terminal is too small. */
static void check_term_size (struct main_win *mw, struct info_win *iw)
{
- mw->too_small = iw->too_small = COLS < 59 || LINES < 17;
+ mw->too_small = iw->too_small = COLS < 79 || LINES < 7;
}
/* Update the title with the current fill. */