summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-08-26 09:51:52 +0000
committerMiles Bader <miles@gnu.org>2005-08-26 09:51:52 +0000
commitd4cccb140682cfa548a8658f905764ceb4a38cb2 (patch)
tree5230af18ee25b37efed50fa38cac1eefb47d03fc /src/term.c
parent5e10f34207ff594cd6570928bc0292a7b53297b8 (diff)
parentf3f01d5df3156fb408b43da0c670796c37ed084f (diff)
downloademacs-d4cccb140682cfa548a8658f905764ceb4a38cb2.tar.gz
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-78
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 514-518) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 104-105) - Update from CVS
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/term.c b/src/term.c
index c8c34ffee39..eb575c1792e 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1,6 +1,6 @@
/* Terminal control module for terminals described by TERMCAP
- Copyright (C) 1985, 86, 87, 93, 94, 95, 98, 2000, 2001, 2002, 2005
- Free Software Foundation, Inc.
+ Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1998, 2000, 2001,
+ 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -451,7 +451,17 @@ set_terminal_modes ()
{
if (FRAME_TERMCAP_P (XFRAME (selected_frame)))
{
- OUTPUT_IF (TS_termcap_modes);
+ if (TS_termcap_modes)
+ OUTPUT (TS_termcap_modes);
+ else
+ {
+ /* Output enough newlines to scroll all the old screen contents
+ off the screen, so it won't be overwritten and lost. */
+ int i;
+ for (i = 0; i < FRAME_LINES (XFRAME (selected_frame)); i++)
+ putchar ('\n');
+ }
+
OUTPUT_IF (TS_cursor_visible);
OUTPUT_IF (TS_keypad_mode);
losecursor ();
@@ -2019,24 +2029,20 @@ turn_on_face (f, face_id)
if (TN_max_colors > 0)
{
- char *p;
+ char *ts, *p;
- if (fg >= 0 && TS_set_foreground)
+ ts = standout_mode ? TS_set_background : TS_set_foreground;
+ if (fg >= 0 && ts)
{
- if (standout_mode)
- p = tparam (TS_set_background, NULL, 0, (int) fg);
- else
- p = tparam (TS_set_foreground, NULL, 0, (int) fg);
+ p = tparam (ts, NULL, 0, (int) fg);
OUTPUT (p);
xfree (p);
}
- if (bg >= 0 && TS_set_background)
+ ts = standout_mode ? TS_set_foreground : TS_set_background;
+ if (bg >= 0 && ts)
{
- if (standout_mode)
- p = tparam (TS_set_foreground, NULL, 0, (int) bg);
- else
- p = tparam (TS_set_background, NULL, 0, (int) bg);
+ p = tparam (ts, NULL, 0, (int) bg);
OUTPUT (p);
xfree (p);
}