aboutsummaryrefslogtreecommitdiffstats
path: root/terms.c
diff options
context:
space:
mode:
authorAkinori Ito <aito@eie.yz.yamagata-u.ac.jp>2001-11-15 00:32:13 +0000
committerAkinori Ito <aito@eie.yz.yamagata-u.ac.jp>2001-11-15 00:32:13 +0000
commit85da7ee692072c643939e9f4b24fbd1e74e64e70 (patch)
tree9fc63298cf968fa560a9e3cf9b6c84516032fca8 /terms.c
parentUpdates from 0.2.1 into 0.2.1-inu-1.5 (diff)
downloadw3m-85da7ee692072c643939e9f4b24fbd1e74e64e70.tar.gz
w3m-85da7ee692072c643939e9f4b24fbd1e74e64e70.zip
Update to w3m-0.2.1-inu-1.6.
Diffstat (limited to 'terms.c')
-rw-r--r--terms.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/terms.c b/terms.c
index 1709064..220b72c 100644
--- a/terms.c
+++ b/terms.c
@@ -1,4 +1,4 @@
-/* $Id: terms.c,v 1.2 2001/11/09 04:59:18 a-ito Exp $ */
+/* $Id: terms.c,v 1.3 2001/11/15 00:32:13 a-ito Exp $ */
/*
* An original curses library for EUC-kanji by Akinori ITO, December 1989
* revised by Akinori ITO, January 1995
@@ -411,6 +411,11 @@ getTCstr(void)
fprintf(stderr, "Can't find termcap entry %s\n", ent);
reset_exit(SIGNAL_ARGLIST);
}
+#ifdef MOUSE
+ if (tgetstr("Km", &pt)) {
+ is_xterm = 1;
+ }
+#endif
GETSTR(T_ce, "ce"); /* clear to the end of line */
GETSTR(T_cd, "cd"); /* clear to the end of display */
@@ -449,7 +454,7 @@ getTCstr(void)
GETSTR(T_ac, "ac"); /* graphics charset pairs */
GETSTR(T_op, "op"); /* set default color pair to its original
* * * * * * * value */
-#ifdef CYGWIN
+#if defined( CYGWIN ) && CYGWIN < 1
/* for TERM=pcansi on MS-DOS prompt.
T_eA = "";
T_as = "\033[12m";
@@ -862,7 +867,7 @@ addch(char c)
void
wrap(void)
{
- if (CurLine == LINES - 1)
+ if (CurLine == LASTLINE)
return;
CurLine++;
CurColumn = 0;
@@ -1012,7 +1017,7 @@ refresh(void)
#endif /* BG_COLOR */
short *dirty;
- for (line = 0; line < LINES; line++) {
+ for (line = 0; line <= LASTLINE; line++) {
dirty = &ScreenImage[line]->isdirty;
if (*dirty & L_DIRTY) {
*dirty &= ~L_DIRTY;
@@ -1078,7 +1083,10 @@ refresh(void)
* avoid the scroll, I prohibit to draw character on
* (COLS-1,LINES-1).
*/
-#ifndef BG_COLOR
+#if !defined( BG_COLOR ) || defined( CYGWIN )
+#ifdef CYGWIN
+ if (isWinConsole)
+#endif
if (line == LINES - 1 && col == COLS - 1)
break;
#endif /* not BG_COLOR */