aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2004-11-21 12:33:35 +0000
committerKim F. Storm2004-11-21 12:33:35 +0000
commit425daf4a73dc89c9c0aa0116bfccecd7e49124f5 (patch)
tree2b6926d95b4e81255c1bc5bbc82437a332dd3a03 /src
parente1814672912cde8723b4bdeab694309442eb09c1 (diff)
downloademacs-425daf4a73dc89c9c0aa0116bfccecd7e49124f5.tar.gz
emacs-425daf4a73dc89c9c0aa0116bfccecd7e49124f5.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c56
1 files changed, 30 insertions, 26 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 04851288e46..4f82767906c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18269,6 +18269,19 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps_p)
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. */
@@ -18306,11 +18319,8 @@ append_glyph (it)
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.
@@ -18348,11 +18358,8 @@ append_composite_glyph (it)
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
@@ -18522,11 +18529,8 @@ produce_image_glyph (it)
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
@@ -18570,11 +18574,8 @@ append_stretch_glyph (it, object, width, height, ascent)
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
@@ -20947,13 +20948,16 @@ note_mode_line_or_margin_highlight (w, x, y, area)
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_echo_string = help; 20953 help = Fget_text_property (pos, Qhelp_echo, string);
20954 XSETWINDOW (help_echo_window, w); 20954 if (!NILP (help))
20955 help_echo_object = string; 20955 {
20956 help_echo_pos = charpos; 20956 help_echo_string = help;
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))