diff options
| author | Eli Zaretskii | 2013-03-10 19:28:04 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-03-10 19:28:04 +0200 |
| commit | 138c0ae83dcf3daede8d8a12459c9fca13d15fac (patch) | |
| tree | 39c91f22d01b298a500830af5d96663776bbd7de | |
| parent | 7d051e215477753b813864caa23c1009c7692bda (diff) | |
| download | emacs-138c0ae83dcf3daede8d8a12459c9fca13d15fac.tar.gz emacs-138c0ae83dcf3daede8d8a12459c9fca13d15fac.zip | |
Use macros from dispextern.h where appropriate.
src/xdisp.c (display_tool_bar_line, redisplay_tool_bar)
(redisplay_internal, set_cursor_from_row, try_window)
(try_window_id, dump_glyph_row, extend_face_to_end_of_line)
(display_line, notice_overwritten_cursor)
(mouse_face_from_buffer_pos, note_mouse_highlight): Use
MATRIX_ROW_DISPLAYS_TEXT_P.
(note_mouse_highlight): Use MATRIX_ROW_GLYPH_START.
(mouse_face_from_string_pos, fast_find_string_pos): Use
MATRIX_ROW_VPOS.
src/xfns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
src/w32fns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
src/xdisp.c (try_cursor_movement): Use MATRIX_ROW and
MATRIX_MODE_LINE_ROW.
src/dispnew.c (update_window): Use MATRIX_ROW and MATRIX_MODE_LINE_ROW.
| -rw-r--r-- | src/ChangeLog | 21 | ||||
| -rw-r--r-- | src/dispnew.c | 4 | ||||
| -rw-r--r-- | src/w32fns.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 56 | ||||
| -rw-r--r-- | src/xfns.c | 4 |
5 files changed, 56 insertions, 33 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2c77950c262..b58bbc0a525 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,24 @@ | |||
| 1 | 2013-03-10 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (display_tool_bar_line, redisplay_tool_bar) | ||
| 4 | (redisplay_internal, set_cursor_from_row, try_window) | ||
| 5 | (try_window_id, dump_glyph_row, extend_face_to_end_of_line) | ||
| 6 | (display_line, notice_overwritten_cursor) | ||
| 7 | (mouse_face_from_buffer_pos, note_mouse_highlight): Use | ||
| 8 | MATRIX_ROW_DISPLAYS_TEXT_P. | ||
| 9 | (note_mouse_highlight): Use MATRIX_ROW_GLYPH_START. | ||
| 10 | (mouse_face_from_string_pos, fast_find_string_pos): Use | ||
| 11 | MATRIX_ROW_VPOS. | ||
| 12 | |||
| 13 | * xfns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P. | ||
| 14 | |||
| 15 | * w32fns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P. | ||
| 16 | |||
| 17 | * xdisp.c (try_cursor_movement): Use MATRIX_ROW and | ||
| 18 | MATRIX_MODE_LINE_ROW. | ||
| 19 | |||
| 20 | * dispnew.c (update_window): Use MATRIX_ROW and MATRIX_MODE_LINE_ROW. | ||
| 21 | |||
| 1 | 2013-03-10 handa <handa@gnu.org> | 22 | 2013-03-10 handa <handa@gnu.org> |
| 2 | 23 | ||
| 3 | * lisp.h (adjust_after_replace): Extern it. | 24 | * lisp.h (adjust_after_replace): Extern it. |
diff --git a/src/dispnew.c b/src/dispnew.c index f9fed7de406..9335365bc71 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -3392,8 +3392,8 @@ update_window (struct window *w, bool force_p) | |||
| 3392 | 3392 | ||
| 3393 | rif->update_window_begin_hook (w); | 3393 | rif->update_window_begin_hook (w); |
| 3394 | yb = window_text_bottom_y (w); | 3394 | yb = window_text_bottom_y (w); |
| 3395 | row = desired_matrix->rows; | 3395 | row = MATRIX_ROW (desired_matrix, 0); |
| 3396 | end = row + desired_matrix->nrows - 1; | 3396 | end = MATRIX_MODE_LINE_ROW (desired_matrix); |
| 3397 | 3397 | ||
| 3398 | /* Take note of the header line, if there is one. We will | 3398 | /* Take note of the header line, if there is one. We will |
| 3399 | update it below, after updating all of the window's lines. */ | 3399 | update it below, after updating all of the window's lines. */ |
diff --git a/src/w32fns.c b/src/w32fns.c index 6fd980c6b70..56cc1f37d08 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -5824,7 +5824,7 @@ Text larger than the specified size is clipped. */) | |||
| 5824 | int row_width; | 5824 | int row_width; |
| 5825 | 5825 | ||
| 5826 | /* Stop at the first empty row at the end. */ | 5826 | /* Stop at the first empty row at the end. */ |
| 5827 | if (!row->enabled_p || !row->displays_text_p) | 5827 | if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) |
| 5828 | break; | 5828 | break; |
| 5829 | 5829 | ||
| 5830 | /* Let the row go over the full width of the frame. */ | 5830 | /* Let the row go over the full width of the frame. */ |
| @@ -5885,7 +5885,7 @@ Text larger than the specified size is clipped. */) | |||
| 5885 | struct glyph *last; | 5885 | struct glyph *last; |
| 5886 | int row_width; | 5886 | int row_width; |
| 5887 | 5887 | ||
| 5888 | if (!row->enabled_p || !row->displays_text_p) | 5888 | if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) |
| 5889 | break; | 5889 | break; |
| 5890 | row->full_width_p = 1; | 5890 | row->full_width_p = 1; |
| 5891 | row_width = row->pixel_width; | 5891 | row_width = row->pixel_width; |
diff --git a/src/xdisp.c b/src/xdisp.c index c6e204702ce..511a5eeb2c3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -11711,7 +11711,8 @@ display_tool_bar_line (struct it *it, int height) | |||
| 11711 | no additional border below the possibly empty tool-bar lines. | 11711 | no additional border below the possibly empty tool-bar lines. |
| 11712 | So to make the extra empty lines look "normal", we have to | 11712 | So to make the extra empty lines look "normal", we have to |
| 11713 | use the tool-bar face for the border too. */ | 11713 | use the tool-bar face for the border too. */ |
| 11714 | if (!row->displays_text_p && !EQ (Vauto_resize_tool_bars, Qgrow_only)) | 11714 | if (!MATRIX_ROW_DISPLAYS_TEXT_P (row) |
| 11715 | && !EQ (Vauto_resize_tool_bars, Qgrow_only)) | ||
| 11715 | it->face_id = DEFAULT_FACE_ID; | 11716 | it->face_id = DEFAULT_FACE_ID; |
| 11716 | 11717 | ||
| 11717 | extend_face_to_end_of_line (it); | 11718 | extend_face_to_end_of_line (it); |
| @@ -11732,7 +11733,7 @@ display_tool_bar_line (struct it *it, int height) | |||
| 11732 | compute_line_metrics (it); | 11733 | compute_line_metrics (it); |
| 11733 | 11734 | ||
| 11734 | /* If line is empty, make it occupy the rest of the tool-bar. */ | 11735 | /* If line is empty, make it occupy the rest of the tool-bar. */ |
| 11735 | if (!row->displays_text_p) | 11736 | if (!MATRIX_ROW_DISPLAYS_TEXT_P (row)) |
| 11736 | { | 11737 | { |
| 11737 | row->height = row->phys_height = it->last_visible_y - row->y; | 11738 | row->height = row->phys_height = it->last_visible_y - row->y; |
| 11738 | row->visible_height = row->height; | 11739 | row->visible_height = row->height; |
| @@ -11947,13 +11948,13 @@ redisplay_tool_bar (struct frame *f) | |||
| 11947 | /* If there are blank lines at the end, except for a partially | 11948 | /* If there are blank lines at the end, except for a partially |
| 11948 | visible blank line at the end that is smaller than | 11949 | visible blank line at the end that is smaller than |
| 11949 | FRAME_LINE_HEIGHT, change the tool-bar's height. */ | 11950 | FRAME_LINE_HEIGHT, change the tool-bar's height. */ |
| 11950 | if (!row->displays_text_p | 11951 | if (!MATRIX_ROW_DISPLAYS_TEXT_P (row) |
| 11951 | && row->height >= FRAME_LINE_HEIGHT (f)) | 11952 | && row->height >= FRAME_LINE_HEIGHT (f)) |
| 11952 | change_height_p = 1; | 11953 | change_height_p = 1; |
| 11953 | 11954 | ||
| 11954 | /* If row displays tool-bar items, but is partially visible, | 11955 | /* If row displays tool-bar items, but is partially visible, |
| 11955 | change the tool-bar's height. */ | 11956 | change the tool-bar's height. */ |
| 11956 | if (row->displays_text_p | 11957 | if (MATRIX_ROW_DISPLAYS_TEXT_P (row) |
| 11957 | && MATRIX_ROW_BOTTOM_Y (row) > it.last_visible_y | 11958 | && MATRIX_ROW_BOTTOM_Y (row) > it.last_visible_y |
| 11958 | && MATRIX_ROW_BOTTOM_Y (row) < max_tool_bar_height) | 11959 | && MATRIX_ROW_BOTTOM_Y (row) < max_tool_bar_height) |
| 11959 | change_height_p = 1; | 11960 | change_height_p = 1; |
| @@ -13144,7 +13145,7 @@ redisplay_internal (void) | |||
| 13144 | /* If this row displays text now but previously didn't, | 13145 | /* If this row displays text now but previously didn't, |
| 13145 | or vice versa, w->window_end_vpos may have to be | 13146 | or vice versa, w->window_end_vpos may have to be |
| 13146 | adjusted. */ | 13147 | adjusted. */ |
| 13147 | if ((it.glyph_row - 1)->displays_text_p) | 13148 | if (MATRIX_ROW_DISPLAYS_TEXT_P (it.glyph_row - 1)) |
| 13148 | { | 13149 | { |
| 13149 | if (XFASTINT (w->window_end_vpos) < this_line_vpos) | 13150 | if (XFASTINT (w->window_end_vpos) < this_line_vpos) |
| 13150 | wset_window_end_vpos (w, make_number (this_line_vpos)); | 13151 | wset_window_end_vpos (w, make_number (this_line_vpos)); |
| @@ -13754,7 +13755,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 13754 | /* Skip over glyphs not having an object at the start and the end of | 13755 | /* Skip over glyphs not having an object at the start and the end of |
| 13755 | the row. These are special glyphs like truncation marks on | 13756 | the row. These are special glyphs like truncation marks on |
| 13756 | terminal frames. */ | 13757 | terminal frames. */ |
| 13757 | if (row->displays_text_p) | 13758 | if (MATRIX_ROW_DISPLAYS_TEXT_P (row)) |
| 13758 | { | 13759 | { |
| 13759 | if (!row->reversed_p) | 13760 | if (!row->reversed_p) |
| 13760 | { | 13761 | { |
| @@ -14931,8 +14932,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 14931 | we would rather display cursor in the next line. */ | 14932 | we would rather display cursor in the next line. */ |
| 14932 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y | 14933 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y |
| 14933 | && MATRIX_ROW_END_CHARPOS (row) == PT | 14934 | && MATRIX_ROW_END_CHARPOS (row) == PT |
| 14934 | && row < w->current_matrix->rows | 14935 | && row < MATRIX_MODE_LINE_ROW (w->current_matrix) |
| 14935 | + w->current_matrix->nrows - 1 | ||
| 14936 | && MATRIX_ROW_START_CHARPOS (row+1) == PT | 14936 | && MATRIX_ROW_START_CHARPOS (row+1) == PT |
| 14937 | && !cursor_row_p (row)) | 14937 | && !cursor_row_p (row)) |
| 14938 | ++row; | 14938 | ++row; |
| @@ -16171,8 +16171,8 @@ try_window (Lisp_Object window, struct text_pos pos, int flags) | |||
| 16171 | wset_window_end_vpos | 16171 | wset_window_end_vpos |
| 16172 | (w, make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix))); | 16172 | (w, make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix))); |
| 16173 | eassert | 16173 | eassert |
| 16174 | (MATRIX_ROW (w->desired_matrix, | 16174 | (MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->desired_matrix, |
| 16175 | XFASTINT (w->window_end_vpos))->displays_text_p); | 16175 | XFASTINT (w->window_end_vpos)))); |
| 16176 | } | 16176 | } |
| 16177 | else | 16177 | else |
| 16178 | { | 16178 | { |
| @@ -17581,7 +17581,7 @@ try_window_id (struct window *w) | |||
| 17581 | struct glyph_row *last_row = MATRIX_ROW (current_matrix, last_vpos); | 17581 | struct glyph_row *last_row = MATRIX_ROW (current_matrix, last_vpos); |
| 17582 | 17582 | ||
| 17583 | /* If last_row is the window end line, it should display text. */ | 17583 | /* If last_row is the window end line, it should display text. */ |
| 17584 | eassert (last_row->displays_text_p); | 17584 | eassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_row)); |
| 17585 | 17585 | ||
| 17586 | /* If window end line was partially visible before, begin | 17586 | /* If window end line was partially visible before, begin |
| 17587 | displaying at that line. Otherwise begin displaying with the | 17587 | displaying at that line. Otherwise begin displaying with the |
| @@ -17628,7 +17628,7 @@ try_window_id (struct window *w) | |||
| 17628 | matrix. Set row to the last row displaying text in current | 17628 | matrix. Set row to the last row displaying text in current |
| 17629 | matrix starting at first_unchanged_at_end_row, after | 17629 | matrix starting at first_unchanged_at_end_row, after |
| 17630 | scrolling. */ | 17630 | scrolling. */ |
| 17631 | eassert (first_unchanged_at_end_row->displays_text_p); | 17631 | eassert (MATRIX_ROW_DISPLAYS_TEXT_P (first_unchanged_at_end_row)); |
| 17632 | row = find_last_row_displaying_text (w->current_matrix, &it, | 17632 | row = find_last_row_displaying_text (w->current_matrix, &it, |
| 17633 | first_unchanged_at_end_row); | 17633 | first_unchanged_at_end_row); |
| 17634 | eassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row)); | 17634 | eassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row)); |
| @@ -17682,10 +17682,10 @@ try_window_id (struct window *w) | |||
| 17682 | { | 17682 | { |
| 17683 | if (desired_row->enabled_p) | 17683 | if (desired_row->enabled_p) |
| 17684 | { | 17684 | { |
| 17685 | if (desired_row->displays_text_p) | 17685 | if (MATRIX_ROW_DISPLAYS_TEXT_P (desired_row)) |
| 17686 | row = desired_row; | 17686 | row = desired_row; |
| 17687 | } | 17687 | } |
| 17688 | else if (current_row->displays_text_p) | 17688 | else if (MATRIX_ROW_DISPLAYS_TEXT_P (current_row)) |
| 17689 | row = current_row; | 17689 | row = current_row; |
| 17690 | } | 17690 | } |
| 17691 | 17691 | ||
| @@ -17865,7 +17865,7 @@ dump_glyph_row (struct glyph_row *row, int vpos, int glyphs) | |||
| 17865 | row->truncated_on_right_p, | 17865 | row->truncated_on_right_p, |
| 17866 | row->continued_p, | 17866 | row->continued_p, |
| 17867 | MATRIX_ROW_CONTINUATION_LINE_P (row), | 17867 | MATRIX_ROW_CONTINUATION_LINE_P (row), |
| 17868 | row->displays_text_p, | 17868 | MATRIX_ROW_DISPLAYS_TEXT_P (row), |
| 17869 | row->ends_at_zv_p, | 17869 | row->ends_at_zv_p, |
| 17870 | row->fill_line_p, | 17870 | row->fill_line_p, |
| 17871 | row->ends_in_middle_of_char_p, | 17871 | row->ends_in_middle_of_char_p, |
| @@ -18501,7 +18501,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 18501 | face = FACE_FROM_ID (f, it->face_id); | 18501 | face = FACE_FROM_ID (f, it->face_id); |
| 18502 | 18502 | ||
| 18503 | if (FRAME_WINDOW_P (f) | 18503 | if (FRAME_WINDOW_P (f) |
| 18504 | && it->glyph_row->displays_text_p | 18504 | && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row) |
| 18505 | && face->box == FACE_NO_BOX | 18505 | && face->box == FACE_NO_BOX |
| 18506 | && face->background == FRAME_BACKGROUND_PIXEL (f) | 18506 | && face->background == FRAME_BACKGROUND_PIXEL (f) |
| 18507 | && !face->stipple | 18507 | && !face->stipple |
| @@ -19761,7 +19761,7 @@ display_line (struct it *it) | |||
| 19761 | mark this glyph row as the one containing the overlay arrow. | 19761 | mark this glyph row as the one containing the overlay arrow. |
| 19762 | This is clearly a mess with variable size fonts. It would be | 19762 | This is clearly a mess with variable size fonts. It would be |
| 19763 | better to let it be displayed like cursors under X. */ | 19763 | better to let it be displayed like cursors under X. */ |
| 19764 | if ((row->displays_text_p || !overlay_arrow_seen) | 19764 | if ((MATRIX_ROW_DISPLAYS_TEXT_P (row) || !overlay_arrow_seen) |
| 19765 | && (overlay_arrow_string = overlay_arrow_at_row (it, row), | 19765 | && (overlay_arrow_string = overlay_arrow_at_row (it, row), |
| 19766 | !NILP (overlay_arrow_string))) | 19766 | !NILP (overlay_arrow_string))) |
| 19767 | { | 19767 | { |
| @@ -19861,7 +19861,7 @@ display_line (struct it *it) | |||
| 19861 | if (it->glyph_row < MATRIX_BOTTOM_TEXT_ROW (it->w->desired_matrix, it->w)) | 19861 | if (it->glyph_row < MATRIX_BOTTOM_TEXT_ROW (it->w->desired_matrix, it->w)) |
| 19862 | it->glyph_row->reversed_p = row->reversed_p; | 19862 | it->glyph_row->reversed_p = row->reversed_p; |
| 19863 | it->start = row->end; | 19863 | it->start = row->end; |
| 19864 | return row->displays_text_p; | 19864 | return MATRIX_ROW_DISPLAYS_TEXT_P (row); |
| 19865 | 19865 | ||
| 19866 | #undef RECORD_MAX_MIN_POS | 19866 | #undef RECORD_MAX_MIN_POS |
| 19867 | } | 19867 | } |
| @@ -25660,7 +25660,7 @@ notice_overwritten_cursor (struct window *w, enum glyph_row_area area, | |||
| 25660 | if (w->phys_cursor.vpos < 0 | 25660 | if (w->phys_cursor.vpos < 0 |
| 25661 | || w->phys_cursor.vpos >= w->current_matrix->nrows | 25661 | || w->phys_cursor.vpos >= w->current_matrix->nrows |
| 25662 | || (row = w->current_matrix->rows + w->phys_cursor.vpos, | 25662 | || (row = w->current_matrix->rows + w->phys_cursor.vpos, |
| 25663 | !(row->enabled_p && row->displays_text_p))) | 25663 | !(row->enabled_p && MATRIX_ROW_DISPLAYS_TEXT_P (row)))) |
| 25664 | return; | 25664 | return; |
| 25665 | 25665 | ||
| 25666 | if (row->cursor_in_fringe_p) | 25666 | if (row->cursor_in_fringe_p) |
| @@ -26595,7 +26595,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26595 | x = r1->x; | 26595 | x = r1->x; |
| 26596 | 26596 | ||
| 26597 | /* Skip truncation glyphs at the start of the glyph row. */ | 26597 | /* Skip truncation glyphs at the start of the glyph row. */ |
| 26598 | if (r1->displays_text_p) | 26598 | if (MATRIX_ROW_DISPLAYS_TEXT_P (r1)) |
| 26599 | for (; glyph < end | 26599 | for (; glyph < end |
| 26600 | && INTEGERP (glyph->object) | 26600 | && INTEGERP (glyph->object) |
| 26601 | && glyph->charpos < 0; | 26601 | && glyph->charpos < 0; |
| @@ -26646,7 +26646,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26646 | glyph = end + r1->used[TEXT_AREA]; | 26646 | glyph = end + r1->used[TEXT_AREA]; |
| 26647 | 26647 | ||
| 26648 | /* Skip truncation glyphs at the start of the glyph row. */ | 26648 | /* Skip truncation glyphs at the start of the glyph row. */ |
| 26649 | if (r1->displays_text_p) | 26649 | if (MATRIX_ROW_DISPLAYS_TEXT_P (r1)) |
| 26650 | for (; glyph > end | 26650 | for (; glyph > end |
| 26651 | && INTEGERP (glyph->object) | 26651 | && INTEGERP (glyph->object) |
| 26652 | && glyph->charpos < 0; | 26652 | && glyph->charpos < 0; |
| @@ -26897,7 +26897,7 @@ fast_find_string_pos (struct window *w, ptrdiff_t pos, Lisp_Object object, | |||
| 26897 | } | 26897 | } |
| 26898 | 26898 | ||
| 26899 | *y = best_row->y; | 26899 | *y = best_row->y; |
| 26900 | *vpos = best_row - w->current_matrix->rows; | 26900 | *vpos = MATRIX_ROW_VPOS (best_row, w->current_matrix); |
| 26901 | } | 26901 | } |
| 26902 | 26902 | ||
| 26903 | return best_glyph != NULL; | 26903 | return best_glyph != NULL; |
| @@ -26935,7 +26935,8 @@ mouse_face_from_string_pos (struct window *w, Mouse_HLInfo *hlinfo, | |||
| 26935 | if (EQ (g->object, object) | 26935 | if (EQ (g->object, object) |
| 26936 | && startpos <= g->charpos && g->charpos <= endpos) | 26936 | && startpos <= g->charpos && g->charpos <= endpos) |
| 26937 | { | 26937 | { |
| 26938 | hlinfo->mouse_face_beg_row = r - w->current_matrix->rows; | 26938 | hlinfo->mouse_face_beg_row |
| 26939 | = MATRIX_ROW_VPOS (r, w->current_matrix); | ||
| 26939 | hlinfo->mouse_face_beg_y = r->y; | 26940 | hlinfo->mouse_face_beg_y = r->y; |
| 26940 | hlinfo->mouse_face_beg_col = g - r->glyphs[TEXT_AREA]; | 26941 | hlinfo->mouse_face_beg_col = g - r->glyphs[TEXT_AREA]; |
| 26941 | hlinfo->mouse_face_beg_x = gx; | 26942 | hlinfo->mouse_face_beg_x = gx; |
| @@ -26953,7 +26954,8 @@ mouse_face_from_string_pos (struct window *w, Mouse_HLInfo *hlinfo, | |||
| 26953 | if (EQ ((g-1)->object, object) | 26954 | if (EQ ((g-1)->object, object) |
| 26954 | && startpos <= (g-1)->charpos && (g-1)->charpos <= endpos) | 26955 | && startpos <= (g-1)->charpos && (g-1)->charpos <= endpos) |
| 26955 | { | 26956 | { |
| 26956 | hlinfo->mouse_face_beg_row = r - w->current_matrix->rows; | 26957 | hlinfo->mouse_face_beg_row |
| 26958 | = MATRIX_ROW_VPOS (r, w->current_matrix); | ||
| 26957 | hlinfo->mouse_face_beg_y = r->y; | 26959 | hlinfo->mouse_face_beg_y = r->y; |
| 26958 | hlinfo->mouse_face_beg_col = g - r->glyphs[TEXT_AREA]; | 26960 | hlinfo->mouse_face_beg_col = g - r->glyphs[TEXT_AREA]; |
| 26959 | for (gx = r->x, g1 = r->glyphs[TEXT_AREA]; g1 < g; ++g1) | 26961 | for (gx = r->x, g1 = r->glyphs[TEXT_AREA]; g1 < g; ++g1) |
| @@ -26992,7 +26994,7 @@ mouse_face_from_string_pos (struct window *w, Mouse_HLInfo *hlinfo, | |||
| 26992 | r--; | 26994 | r--; |
| 26993 | 26995 | ||
| 26994 | /* Set the end row and its vertical pixel coordinate. */ | 26996 | /* Set the end row and its vertical pixel coordinate. */ |
| 26995 | hlinfo->mouse_face_end_row = r - w->current_matrix->rows; | 26997 | hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r, w->current_matrix); |
| 26996 | hlinfo->mouse_face_end_y = r->y; | 26998 | hlinfo->mouse_face_end_y = r->y; |
| 26997 | 26999 | ||
| 26998 | /* Compute and set the end column and the end column's horizontal | 27000 | /* Compute and set the end column and the end column's horizontal |
| @@ -27676,7 +27678,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 27676 | /* Clear mouse face if X/Y not over text. */ | 27678 | /* Clear mouse face if X/Y not over text. */ |
| 27677 | if (glyph == NULL | 27679 | if (glyph == NULL |
| 27678 | || area != TEXT_AREA | 27680 | || area != TEXT_AREA |
| 27679 | || !MATRIX_ROW (w->current_matrix, vpos)->displays_text_p | 27681 | || !MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->current_matrix, vpos)) |
| 27680 | /* Glyph's OBJECT is an integer for glyphs inserted by the | 27682 | /* Glyph's OBJECT is an integer for glyphs inserted by the |
| 27681 | display engine for its internal purposes, like truncation | 27683 | display engine for its internal purposes, like truncation |
| 27682 | and continuation glyphs and blanks beyond the end of | 27684 | and continuation glyphs and blanks beyond the end of |
| @@ -27688,7 +27690,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 27688 | all beyond the end of text. Treat such stretch glyphs | 27690 | all beyond the end of text. Treat such stretch glyphs |
| 27689 | like we do with NULL glyphs in L2R rows. */ | 27691 | like we do with NULL glyphs in L2R rows. */ |
| 27690 | || (MATRIX_ROW (w->current_matrix, vpos)->reversed_p | 27692 | || (MATRIX_ROW (w->current_matrix, vpos)->reversed_p |
| 27691 | && glyph == MATRIX_ROW (w->current_matrix, vpos)->glyphs[TEXT_AREA] | 27693 | && glyph == MATRIX_ROW_GLYPH_START (w->current_matrix, vpos) |
| 27692 | && glyph->type == STRETCH_GLYPH | 27694 | && glyph->type == STRETCH_GLYPH |
| 27693 | && glyph->avoid_cursor_p)) | 27695 | && glyph->avoid_cursor_p)) |
| 27694 | { | 27696 | { |
diff --git a/src/xfns.c b/src/xfns.c index 5c93b8ef4da..a6a56c8c5e1 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -5067,7 +5067,7 @@ Text larger than the specified size is clipped. */) | |||
| 5067 | int row_width; | 5067 | int row_width; |
| 5068 | 5068 | ||
| 5069 | /* Stop at the first empty row at the end. */ | 5069 | /* Stop at the first empty row at the end. */ |
| 5070 | if (!row->enabled_p || !row->displays_text_p) | 5070 | if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) |
| 5071 | break; | 5071 | break; |
| 5072 | 5072 | ||
| 5073 | /* Let the row go over the full width of the frame. */ | 5073 | /* Let the row go over the full width of the frame. */ |
| @@ -5126,7 +5126,7 @@ Text larger than the specified size is clipped. */) | |||
| 5126 | struct glyph *last; | 5126 | struct glyph *last; |
| 5127 | int row_width; | 5127 | int row_width; |
| 5128 | 5128 | ||
| 5129 | if (!row->enabled_p || !row->displays_text_p) | 5129 | if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) |
| 5130 | break; | 5130 | break; |
| 5131 | row->full_width_p = 1; | 5131 | row->full_width_p = 1; |
| 5132 | row_width = row->pixel_width; | 5132 | row_width = row->pixel_width; |