Mercurial > emacs
comparison src/xdisp.c @ 58394:914f38aa54fd
(IT_EXPAND_MATRIX_WIDTH): New macro. Do not
expand matrix width for overflow in zero-width area.
(append_glyph, append_composite_glyph, produce_image_glyph)
(append_stretch_glyph): Use it to avoid loop in redisplay.
(note_mode_line_or_margin_highlight): Don't let help-echo from
string override help-echo from image map.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sun, 21 Nov 2004 12:33:35 +0000 |
parents | 1a8c950076bd |
children | af23c201a4fc |
comparison
equal
deleted
inserted
replaced
58393:5ebca6762883 | 58394:914f38aa54fd |
---|---|
18267 RELEASE_HDC (hdc, f); | 18267 RELEASE_HDC (hdc, f); |
18268 | 18268 |
18269 return x_reached; | 18269 return x_reached; |
18270 } | 18270 } |
18271 | 18271 |
18272 /* Expand row matrix if too narrow. Don't expand if area | |
18273 is not present. */ | |
18274 | |
18275 #define IT_EXPAND_MATRIX_WIDTH(it, area) \ | |
18276 { \ | |
18277 if (!fonts_changed_p \ | |
18278 && (it->glyph_row->glyphs[area] \ | |
18279 < it->glyph_row->glyphs[area + 1])) \ | |
18280 { \ | |
18281 it->w->ncols_scale_factor++; \ | |
18282 fonts_changed_p = 1; \ | |
18283 } \ | |
18284 } | |
18272 | 18285 |
18273 /* Store one glyph for IT->char_to_display in IT->glyph_row. | 18286 /* Store one glyph for IT->char_to_display in IT->glyph_row. |
18274 Called from x_produce_glyphs when IT->glyph_row is non-null. */ | 18287 Called from x_produce_glyphs when IT->glyph_row is non-null. */ |
18275 | 18288 |
18276 static INLINE void | 18289 static INLINE void |
18304 glyph->u.ch = it->char_to_display; | 18317 glyph->u.ch = it->char_to_display; |
18305 glyph->slice = null_glyph_slice; | 18318 glyph->slice = null_glyph_slice; |
18306 glyph->font_type = FONT_TYPE_UNKNOWN; | 18319 glyph->font_type = FONT_TYPE_UNKNOWN; |
18307 ++it->glyph_row->used[area]; | 18320 ++it->glyph_row->used[area]; |
18308 } | 18321 } |
18309 else if (!fonts_changed_p) | 18322 else |
18310 { | 18323 IT_EXPAND_MATRIX_WIDTH (it, area); |
18311 it->w->ncols_scale_factor++; | |
18312 fonts_changed_p = 1; | |
18313 } | |
18314 } | 18324 } |
18315 | 18325 |
18316 /* Store one glyph for the composition IT->cmp_id in IT->glyph_row. | 18326 /* Store one glyph for the composition IT->cmp_id in IT->glyph_row. |
18317 Called from x_produce_glyphs when IT->glyph_row is non-null. */ | 18327 Called from x_produce_glyphs when IT->glyph_row is non-null. */ |
18318 | 18328 |
18346 glyph->u.cmp_id = it->cmp_id; | 18356 glyph->u.cmp_id = it->cmp_id; |
18347 glyph->slice = null_glyph_slice; | 18357 glyph->slice = null_glyph_slice; |
18348 glyph->font_type = FONT_TYPE_UNKNOWN; | 18358 glyph->font_type = FONT_TYPE_UNKNOWN; |
18349 ++it->glyph_row->used[area]; | 18359 ++it->glyph_row->used[area]; |
18350 } | 18360 } |
18351 else if (!fonts_changed_p) | 18361 else |
18352 { | 18362 IT_EXPAND_MATRIX_WIDTH (it, area); |
18353 it->w->ncols_scale_factor++; | |
18354 fonts_changed_p = 1; | |
18355 } | |
18356 } | 18363 } |
18357 | 18364 |
18358 | 18365 |
18359 /* Change IT->ascent and IT->height according to the setting of | 18366 /* Change IT->ascent and IT->height according to the setting of |
18360 IT->voffset. */ | 18367 IT->voffset. */ |
18520 glyph->u.img_id = img->id; | 18527 glyph->u.img_id = img->id; |
18521 glyph->slice = slice; | 18528 glyph->slice = slice; |
18522 glyph->font_type = FONT_TYPE_UNKNOWN; | 18529 glyph->font_type = FONT_TYPE_UNKNOWN; |
18523 ++it->glyph_row->used[area]; | 18530 ++it->glyph_row->used[area]; |
18524 } | 18531 } |
18525 else if (!fonts_changed_p) | 18532 else |
18526 { | 18533 IT_EXPAND_MATRIX_WIDTH (it, area); |
18527 it->w->ncols_scale_factor++; | |
18528 fonts_changed_p = 1; | |
18529 } | |
18530 } | 18534 } |
18531 } | 18535 } |
18532 | 18536 |
18533 | 18537 |
18534 /* Append a stretch glyph to IT->glyph_row. OBJECT is the source | 18538 /* Append a stretch glyph to IT->glyph_row. OBJECT is the source |
18568 glyph->u.stretch.height = height; | 18572 glyph->u.stretch.height = height; |
18569 glyph->slice = null_glyph_slice; | 18573 glyph->slice = null_glyph_slice; |
18570 glyph->font_type = FONT_TYPE_UNKNOWN; | 18574 glyph->font_type = FONT_TYPE_UNKNOWN; |
18571 ++it->glyph_row->used[area]; | 18575 ++it->glyph_row->used[area]; |
18572 } | 18576 } |
18573 else if (!fonts_changed_p) | 18577 else |
18574 { | 18578 IT_EXPAND_MATRIX_WIDTH (it, area); |
18575 it->w->ncols_scale_factor++; | |
18576 fonts_changed_p = 1; | |
18577 } | |
18578 } | 18579 } |
18579 | 18580 |
18580 | 18581 |
18581 /* Produce a stretch glyph for iterator IT. IT->object is the value | 18582 /* Produce a stretch glyph for iterator IT. IT->object is the value |
18582 of the glyph property displayed. The value must be a list | 18583 of the glyph property displayed. The value must be a list |
20945 { | 20946 { |
20946 pos = make_number (charpos); | 20947 pos = make_number (charpos); |
20947 /* If we're on a string with `help-echo' text property, arrange | 20948 /* If we're on a string with `help-echo' text property, arrange |
20948 for the help to be displayed. This is done by setting the | 20949 for the help to be displayed. This is done by setting the |
20949 global variable help_echo_string to the help string. */ | 20950 global variable help_echo_string to the help string. */ |
20950 help = Fget_text_property (pos, Qhelp_echo, string); | 20951 if (NILP (help)) |
20951 if (!NILP (help)) | 20952 { |
20952 { | 20953 help = Fget_text_property (pos, Qhelp_echo, string); |
20953 help_echo_string = help; | 20954 if (!NILP (help)) |
20954 XSETWINDOW (help_echo_window, w); | 20955 { |
20955 help_echo_object = string; | 20956 help_echo_string = help; |
20956 help_echo_pos = charpos; | 20957 XSETWINDOW (help_echo_window, w); |
20958 help_echo_object = string; | |
20959 help_echo_pos = charpos; | |
20960 } | |
20957 } | 20961 } |
20958 | 20962 |
20959 if (NILP (pointer)) | 20963 if (NILP (pointer)) |
20960 pointer = Fget_text_property (pos, Qpointer, string); | 20964 pointer = Fget_text_property (pos, Qpointer, string); |
20961 | 20965 |