X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/6d8cf83040cdb54a0b1d72bd6a021f9815bd4af2..475789a7d6e602ceed2980c2f2a1c41fc46b56e7:/src/dispnew.c diff --git a/src/dispnew.c b/src/dispnew.c index 095400eb70..5f3c8eacc3 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1,7 +1,7 @@ /* 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. @@ -3345,7 +3345,7 @@ DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, 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); @@ -4361,10 +4361,14 @@ update_text_area (w, vpos) 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); @@ -4483,7 +4487,10 @@ update_text_area (w, vpos) 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)) { @@ -6068,7 +6075,7 @@ window_change_signal (signalnum) /* If we don't have an argument, */ get_tty_size (fileno (tty->input), &width, &height); - { + if (width > 5 && height > 2) { Lisp_Object tail, frame; FOR_EACH_FRAME (tail, frame) @@ -6304,23 +6311,23 @@ DEFUN ("send-string-to-terminal", Fsend_string_to_terminal, 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) { @@ -6783,34 +6790,34 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\ #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)); }