diff --git a/defines.h b/defines.h index b710333..0962da3 100644 --- a/defines.h +++ b/defines.h @@ -14,5 +14,7 @@ #define CTLX 0x40000000 /* ^X flag, or'ed in */ #define SPEC 0x80000000 /* special key (function keys) */ -#define MAXCOL 500 -#define MAXROW 500 +/* Actual 380x134 on a 1920x1080 screen in landscape, + if smaller font or portrait orientation limit to 400x150 */ +#define MAXCOL 400 +#define MAXROW 150 diff --git a/tcap.c b/tcap.c index 07434d5..7c73511 100644 --- a/tcap.c +++ b/tcap.c @@ -164,6 +164,11 @@ static void tcapopen(void) /* At initialization we use maximum size even if current OS window is smaller */ term.t_mrow = MAXROW ; term.t_mcol = MAXCOL ; + if( term.t_nrow >= term.t_mrow) + term.t_nrow = term.t_mrow - 1 ; + + if( term.t_ncol > term.t_mcol) + term.t_ncol = term.t_mcol ; #else term.t_mrow = term.t_nrow > MAXROW ? MAXROW : term.t_nrow; term.t_mcol = term.t_ncol > MAXCOL ? MAXCOL : term.t_ncol;