bottom_y = MATRIX_ROW_BOTTOM_Y (row);
- if (row->overlapping_p && i > 0 && bottom_y < yb)
+ if (row->overlapping_p)
{
int overlaps = 0;
- if (MATRIX_ROW_OVERLAPS_PRED_P (row)
+ if (MATRIX_ROW_OVERLAPS_PRED_P (row) && i > 0
&& !MATRIX_ROW (w->current_matrix, i - 1)->overlapped_p)
overlaps |= OVERLAPS_PRED;
- if (MATRIX_ROW_OVERLAPS_SUCC_P (row)
+ if (MATRIX_ROW_OVERLAPS_SUCC_P (row) && bottom_y < yb
&& !MATRIX_ROW (w->current_matrix, i + 1)->overlapped_p)
overlaps |= OVERLAPS_SUCC;
int *width, *height;
{
struct it it;
- struct buffer *old_current_buffer = current_buffer;
+ Lisp_Object old_current_buffer = Fcurrent_buffer ();
struct text_pos startp;
Lisp_Object string;
struct glyph_row *row;
#endif
int x0, x1;
- current_buffer = XBUFFER (w->buffer);
+ /* We used to set current_buffer directly here, but that does the
+ wrong thing with `face-remapping-alist' (bug#2044). */
+ Fset_buffer (w->buffer);
SET_TEXT_POS_FROM_MARKER (startp, w->start);
CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp)));
BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp)));
move_it_to (&it, -1, x0 + it.first_visible_x, *y, -1,
MOVE_TO_X | MOVE_TO_Y);
- current_buffer = old_current_buffer;
+ Fset_buffer (old_current_buffer);
*dx = x0 + it.first_visible_x - it.current_x;
*dy = *y - it.current_y;
if (! tty->term_initted)
continue;
+ /* Suspended tty frames have tty->input == NULL avoid trying to
+ use it. */
+ if (!tty->input)
+ continue;
+
get_tty_size (fileno (tty->input), &width, &height);
if (width > 5 && height > 2) {
Control characters in STRING will have terminal-dependent effects.
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
+It may be a terminal object, a frame, or nil for the terminal used by the
currently selected frame. */)
(string, terminal)
Lisp_Object string;