diff options
Diffstat (limited to 'osdep/getch2.c')
-rw-r--r-- | osdep/getch2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/osdep/getch2.c b/osdep/getch2.c index e4a5c9cb1c..ac9c5e8395 100644 --- a/osdep/getch2.c +++ b/osdep/getch2.c @@ -40,6 +40,7 @@ static char getch2_buf[BUF_LEN]; int screen_width=80; int screen_height=24; +char * erase_to_end_of_line = "\033[J"; typedef struct { int len; @@ -78,6 +79,7 @@ char *p=tgetstr(id,&term_p); static int success=0; int load_termcap(char *termtype){ + char * p; if(!termtype) termtype=getenv("TERM"); if(!termtype) termtype="unknown"; success=tgetent(term_buffer, termtype); @@ -88,6 +90,7 @@ int load_termcap(char *termtype){ screen_height=tgetnum("li"); if(screen_width<1 || screen_width>255) screen_width=80; if(screen_height<1 || screen_height>255) screen_height=24; + if ((p = tgetstr("cd",&term_p))) erase_to_end_of_line=p; termcap_add("kP",KEY_PGUP); termcap_add("kN",KEY_PGDWN); |