diff --git a/defines.h b/defines.h index 6327efe..df74eee 100644 --- a/defines.h +++ b/defines.h @@ -20,11 +20,6 @@ #define CTLX 0x04000000 /* ^X flag, or'ed in */ #define SPEC 0x08000000 /* special key (function keys) */ -/* Actual 380x134 on a 1920x1080 screen in landscape, - if smaller font or portrait orientation limit to 400x150 */ -#define MAXCOL 400 -#define MAXROW 150 - #endif /* end of defines.h */ diff --git a/tcap.c b/tcap.c index 4740342..5501b0f 100644 --- a/tcap.c +++ b/tcap.c @@ -156,17 +156,12 @@ static void tcapopen(void) fputs( "Termcap entry incomplete (columns)\n", stderr) ; exit( EXIT_FAILURE) ; } -#ifdef SIGWINCH -/* At initialization we use maximum size even if current OS window is smaller */ + term.t_mrow = int_row < MAXROW ? int_row : MAXROW ; term.t_nrow = term.t_mrow - 1 ; term.t_mcol = int_col < MAXCOL ? int_col : MAXCOL ; 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; -#endif p = tcapbuf; t = tgetstr("pc", &p); if (t) diff --git a/terminal.h b/terminal.h index 9346df6..72603b1 100644 --- a/terminal.h +++ b/terminal.h @@ -6,6 +6,13 @@ #include "retcode.h" #include "utf8.h" + +/* Actual 471x175 on a 1920x1080 screen in landscape, + if smaller font or portrait orientation limit to 500x200 */ +#define MAXCOL 500 +#define MAXROW 200 + + /* * The editor communicates with the display using a high level interface. A * "TERM" structure holds useful variables, and indirect pointers to routines