/* Updating of data structures for redisplay.
Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995,
1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Emacs.
update_begin (f);
#ifdef MSDOS
if (FRAME_MSDOS_P (f))
- set_terminal_modes (FRAME_DEVICE (f));
+ set_terminal_modes (FRAME_TERMINAL (f));
#endif
clear_frame (f);
clear_current_matrices (f);
int overlapping_glyphs_p = current_row->contains_overlapping_glyphs_p;
int desired_stop_pos = desired_row->used[TEXT_AREA];
- /* If the desired row extends its face to the text area end,
+ /* If the desired row extends its face to the text area end, and
+ unless the current row also does so at the same position,
make sure we write at least one glyph, so that the face
extension actually takes place. */
- if (MATRIX_ROW_EXTENDS_FACE_P (desired_row))
+ if (MATRIX_ROW_EXTENDS_FACE_P (desired_row)
+ && (desired_stop_pos < current_row->used[TEXT_AREA]
+ || (desired_stop_pos == current_row->used[TEXT_AREA]
+ && !MATRIX_ROW_EXTENDS_FACE_P (current_row))))
--desired_stop_pos;
stop = min (current_row->used[TEXT_AREA], desired_stop_pos);
has to be cleared, if and only if we did a write_glyphs
above. This is made sure by setting desired_stop_pos
appropriately above. */
- xassert (i < desired_row->used[TEXT_AREA]);
+ xassert (i < desired_row->used[TEXT_AREA]
+ || ((desired_row->used[TEXT_AREA]
+ == current_row->used[TEXT_AREA])
+ && MATRIX_ROW_EXTENDS_FACE_P (current_row)));
}
else if (MATRIX_ROW_EXTENDS_FACE_P (current_row))
{
get_tty_size (fileno (tty->input), &width, &height);
- {
+ if (width > 5 && height > 2) {
Lisp_Object tail, frame;
FOR_EACH_FRAME (tail, frame)
doc: /* Send STRING to the terminal without alteration.
Control characters in STRING will have terminal-dependent effects.
-Optional parameter TERMINAL specifies the tty display device to use.
+Optional parameter TERMINAL specifies the tty terminal device to use.
It may be a terminal id, a frame, or nil for the terminal used by the
currently selected frame. */)
- (string, display)
+ (string, terminal)
Lisp_Object string;
- Lisp_Object display;
+ Lisp_Object terminal;
{
- struct device *d = get_tty_device (display);
+ struct terminal *t = get_tty_terminal (terminal);
struct tty_display_info *tty;
/* ??? Perhaps we should do something special for multibyte strings here. */
CHECK_STRING (string);
- if (!d)
- error ("Unknown display device");
+ if (!t)
+ error ("Unknown terminal device");
- tty = d->display_info.tty;
+ tty = t->display_info.tty;
if (tty->termscript)
{
#endif /* VMS */
{
- struct device *d;
+ struct terminal *t;
struct frame *f = XFRAME (selected_frame);
/* Open a display on the controlling tty. */
- d = init_tty (0, terminal_type, 1); /* Errors are fatal. */
+ t = init_tty (0, terminal_type, 1); /* Errors are fatal. */
/* Convert the initial frame to use the new display. */
if (f->output_method != output_initial)
abort ();
- f->output_method = d->type;
- f->device = d;
+ f->output_method = t->type;
+ f->terminal = t;
- d->reference_count++;
- d->display_info.tty->top_frame = selected_frame;
+ t->reference_count++;
+ t->display_info.tty->top_frame = selected_frame;
change_frame_size (XFRAME (selected_frame),
- FrameRows (d->display_info.tty),
- FrameCols (d->display_info.tty), 0, 0, 1);
+ FrameRows (t->display_info.tty),
+ FrameCols (t->display_info.tty), 0, 0, 1);
- /* Delete the initial display. */
- if (--initial_device->reference_count == 0
- && initial_device->delete_device_hook)
- (*initial_device->delete_device_hook) (initial_device);
+ /* Delete the initial terminal. */
+ if (--initial_terminal->reference_count == 0
+ && initial_terminal->delete_terminal_hook)
+ (*initial_terminal->delete_terminal_hook) (initial_terminal);
/* Update frame parameters to reflect the new type. */
Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil));
Fmodify_frame_parameters
(selected_frame, Fcons (Fcons (Qtty_type,
- Fdisplay_tty_type (selected_frame)), Qnil));
+ Ftty_type (selected_frame)), Qnil));
Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qtty, Qnil), Qnil));
}