X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/95a60dc06b2d05485a702e62ee00834a71753922..432336f04440701a10fd58eeacfa14683a9ae903:/src/xdisp.c diff --git a/src/xdisp.c b/src/xdisp.c index 9e40cd2625..024b590a87 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3919,10 +3919,14 @@ handle_face_prop (struct it *it) /* For strings from a `display' property, use the face at IT's current buffer position as the base face to merge with, so that overlay strings appear in the same face as - surrounding text, unless they specify their own - faces. */ + surrounding text, unless they specify their own faces. + For strings from wrap-prefix and line-prefix properties, + use the default face, possibly remapped via + Vface_remapping_alist. */ base_face_id = it->string_from_prefix_prop_p - ? DEFAULT_FACE_ID + ? (!NILP (Vface_remapping_alist) + ? lookup_basic_face (it->f, DEFAULT_FACE_ID) + : DEFAULT_FACE_ID) : underlying_face_id (it); } @@ -7086,7 +7090,9 @@ get_next_display_element (struct it *it) } } } - else + /* next_element_from_display_vector sets this flag according to + faces of the display vector glyphs, see there. */ + else if (it->method != GET_FROM_DISPLAY_VECTOR) { int face_id = face_after_it_pos (it); it->end_of_box_run_p @@ -12434,13 +12440,11 @@ note_tool_bar_highlight (struct frame *f, int x, int y) hlinfo->mouse_face_beg_col = hpos; hlinfo->mouse_face_beg_row = vpos; hlinfo->mouse_face_beg_x = x; - hlinfo->mouse_face_beg_y = row->y; hlinfo->mouse_face_past_end = 0; hlinfo->mouse_face_end_col = hpos + 1; hlinfo->mouse_face_end_row = vpos; hlinfo->mouse_face_end_x = x + glyph->pixel_width; - hlinfo->mouse_face_end_y = row->y; hlinfo->mouse_face_window = window; hlinfo->mouse_face_face_id = TOOL_BAR_FACE_ID; @@ -13800,7 +13804,7 @@ mark_window_display_accurate_1 (struct window *w, int accurate_p) w->current_matrix->begv = BUF_BEGV (b); w->current_matrix->zv = BUF_ZV (b); - w->last_cursor = w->cursor; + w->last_cursor_vpos = w->cursor.vpos; w->last_cursor_off_p = w->cursor_off_p; if (w == XWINDOW (selected_window)) @@ -15144,12 +15148,12 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste /* Start with the row the cursor was displayed during the last not paused redisplay. Give up if that row is not valid. */ - if (w->last_cursor.vpos < 0 - || w->last_cursor.vpos >= w->current_matrix->nrows) + if (w->last_cursor_vpos < 0 + || w->last_cursor_vpos >= w->current_matrix->nrows) rc = CURSOR_MOVEMENT_MUST_SCROLL; else { - row = MATRIX_ROW (w->current_matrix, w->last_cursor.vpos); + row = MATRIX_ROW (w->current_matrix, w->last_cursor_vpos); if (row->mode_line_p) ++row; if (!row->enabled_p) @@ -27361,9 +27365,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, r1 = tem; } - hlinfo->mouse_face_beg_y = r1->y; hlinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (r1, w->current_matrix); - hlinfo->mouse_face_end_y = r2->y; hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix); /* For a bidi-reordered row, the positions of BEFORE_STRING, @@ -27727,7 +27729,6 @@ mouse_face_from_string_pos (struct window *w, Mouse_HLInfo *hlinfo, { hlinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (r, w->current_matrix); - hlinfo->mouse_face_beg_y = r->y; hlinfo->mouse_face_beg_col = g - r->glyphs[TEXT_AREA]; hlinfo->mouse_face_beg_x = gx; found = 1; @@ -27746,7 +27747,6 @@ mouse_face_from_string_pos (struct window *w, Mouse_HLInfo *hlinfo, { hlinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (r, w->current_matrix); - hlinfo->mouse_face_beg_y = r->y; hlinfo->mouse_face_beg_col = g - r->glyphs[TEXT_AREA]; for (gx = r->x, g1 = r->glyphs[TEXT_AREA]; g1 < g; ++g1) gx += g1->pixel_width; @@ -27783,9 +27783,8 @@ mouse_face_from_string_pos (struct window *w, Mouse_HLInfo *hlinfo, /* The highlighted region ends on the previous row. */ r--; - /* Set the end row and its vertical pixel coordinate. */ + /* Set the end row. */ hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r, w->current_matrix); - hlinfo->mouse_face_end_y = r->y; /* Compute and set the end column and the end column's horizontal pixel coordinate. */ @@ -28283,8 +28282,6 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, hlinfo->mouse_face_beg_row = vpos; hlinfo->mouse_face_end_row = hlinfo->mouse_face_beg_row; - hlinfo->mouse_face_beg_y = 0; - hlinfo->mouse_face_end_y = 0; hlinfo->mouse_face_past_end = 0; hlinfo->mouse_face_window = window; @@ -29979,10 +29976,6 @@ cursor shapes. */); DEFSYM (Qzero_width, "zero-width"); DEFSYM (Qglyphless_char_display, "glyphless-char-display"); - /* Intern this now in case it isn't already done. - Setting this variable twice is harmless. - But don't staticpro it here--that is done in alloc.c. */ - Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1)); DEFVAR_LISP ("glyphless-char-display", Vglyphless_char_display,