/* Ascent and height of the last line processed by move_it_to. */
-static int last_max_ascent, last_height;
+static int last_height;
/* Non-zero if there's a help-echo in the echo area. */
it->redisplay_end_trigger_charpos
= marker_position (w->redisplay_end_trigger);
else if (INTEGERP (w->redisplay_end_trigger))
- it->redisplay_end_trigger_charpos =
- clip_to_bounds (PTRDIFF_MIN, XINT (w->redisplay_end_trigger), PTRDIFF_MAX);
+ it->redisplay_end_trigger_charpos
+ = clip_to_bounds (PTRDIFF_MIN, XINT (w->redisplay_end_trigger),
+ PTRDIFF_MAX);
it->tab_width = SANE_TAB_WIDTH (current_buffer);
it->bidi_it.string.s = NULL;
it->bidi_it.string.lstring = Qnil;
it->bidi_it.string.bufpos = 0;
+ it->bidi_it.string.from_disp_str = 0;
it->bidi_it.string.unibyte = 0;
it->bidi_it.w = it->w;
}
it->current_y += it->max_ascent + it->max_descent;
++it->vpos;
last_height = it->max_ascent + it->max_descent;
- last_max_ascent = it->max_ascent;
it->max_ascent = it->max_descent = 0;
}
it->current_y += it->max_ascent + it->max_descent;
++it->vpos;
last_height = it->max_ascent + it->max_descent;
- last_max_ascent = it->max_ascent;
}
if (backup_data)
include the height of the mode- or header-line of WINDOW in the return
value. If it is either the symbol `mode-line' or `header-line', include
only the height of that line, if present, in the return value. If t,
-include the height of any of these lines in the return value. */)
+include the height of both, if present, in the return value. */)
(Lisp_Object window, Lisp_Object from, Lisp_Object to, Lisp_Object x_limit, Lisp_Object y_limit,
Lisp_Object mode_and_header_line)
{
SET_TEXT_POS (startp, start, CHAR_TO_BYTE (start));
start_display (&it, w, startp);
- /** move_it_vertically_backward (&it, 0); **/
if (NILP (x_limit))
x = move_it_to (&it, end, -1, max_y, -1, MOVE_TO_POS | MOVE_TO_Y);
else
MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
}
- if (start == end)
- y = it.current_y;
- else
- {
- /* Count last line. */
- last_height = 0;
- y = line_bottom_y (&it); /* - y; */
- }
+ y = it.current_y + it.max_ascent + it.max_descent;
if (!EQ (mode_and_header_line, Qheader_line)
&& !EQ (mode_and_header_line, Qt))
/* Compute a suitable window start. */
if (height > max_height)
{
- height = max_height;
+ height = (max_height / unit) * unit;
init_iterator (&it, w, ZV, ZV_BYTE, NULL, DEFAULT_FACE_ID);
- move_it_vertically_backward (&it, height);
+ move_it_vertically_backward (&it, height - unit);
start = it.current.pos;
}
else
itb.string.s = NULL;
itb.string.lstring = Qnil;
itb.string.bufpos = 0;
+ itb.string.from_disp_str = 0;
itb.string.unibyte = 0;
/* We have no window to use here for ignoring window-specific
overlays. Using NULL for window pointer will cause
|| part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
{
note_mode_line_or_margin_highlight (window, x, y, part);
- return;
+
+#ifdef HAVE_WINDOW_SYSTEM
+ if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
+ {
+ cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
+ /* Show non-text cursor (Bug#16647). */
+ goto set_cursor;
+ }
+ else
+#endif
+ return;
}
#ifdef HAVE_WINDOW_SYSTEM
int x0 = WINDOW_RIGHT_EDGE_X (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w);
int x1 = WINDOW_RIGHT_EDGE_X (w);
int y0 = WINDOW_TOP_EDGE_Y (w);
- int y1 = WINDOW_BOTTOM_EDGE_Y (w);
+ /* The bottom divider prevails. */
+ int y1 = WINDOW_BOTTOM_EDGE_Y (w) - WINDOW_BOTTOM_DIVIDER_WIDTH (w);
FRAME_RIF (f)->draw_window_divider (w, x0, x1, y0, y1);
}