From: Eli Zaretskii Date: Sun, 18 Sep 2011 07:33:04 +0000 (-0400) Subject: src/.gdbinit (pgx): Fix references to fields of `struct glyph'. X-Git-Tag: emacs-pretest-24.0.90~104^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1674f0b8f8a8fb16d01df3d1430bf3f43989323;p=emacs.git src/.gdbinit (pgx): Fix references to fields of `struct glyph'. --- diff --git a/src/.gdbinit b/src/.gdbinit index 0f51a00ea76..b908ef005d6 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -483,83 +483,83 @@ end define pgx set $g = $arg0 # CHAR_GLYPH - if ($g->type == 0) - if ($g->u.ch >= ' ' && $g->u.ch < 127) - printf "CHAR[%c]", $g->u.ch + if ($g.type == 0) + if ($g.u.ch >= ' ' && $g.u.ch < 127) + printf "CHAR[%c]", $g.u.ch else - printf "CHAR[0x%x]", $g->u.ch + printf "CHAR[0x%x]", $g.u.ch end end # COMPOSITE_GLYPH - if ($g->type == 1) - printf "COMP[%d (%d..%d)]", $g->u.cmp.id, $g->slice.cmp.from, $g->slice.cmp.to + if ($g.type == 1) + printf "COMP[%d (%d..%d)]", $g.u.cmp.id, $g.slice.cmp.from, $g.slice.cmp.to end # GLYPHLESS_GLYPH - if ($g->type == 2) + if ($g.type == 2) printf "GLYPHLESS[" - if ($g->u.glyphless.method == 0) + if ($g.u.glyphless.method == 0) printf "THIN]" end - if ($g->u.glyphless.method == 1) + if ($g.u.glyphless.method == 1) printf "EMPTY]" end - if ($g->u.glyphless.method == 2) + if ($g.u.glyphless.method == 2) printf "ACRO]" end - if ($g->u.glyphless.method == 3) + if ($g.u.glyphless.method == 3) printf "HEX]" end end # IMAGE_GLYPH - if ($g->type == 3) - printf "IMAGE[%d]", $g->u.img_id + if ($g.type == 3) + printf "IMAGE[%d]", $g.u.img_id end # STRETCH_GLYPH - if ($g->type == 4) - printf "STRETCH[%d+%d]", $g->u.stretch.height, $g->u.stretch.ascent + if ($g.type == 4) + printf "STRETCH[%d+%d]", $g.u.stretch.height, $g.u.stretch.ascent end - xgettype ($g->object) + xgettype ($g.object) if ($type == Lisp_String) - printf " str=%x[%d]", $g->object, $g->charpos + printf " str=%x[%d]", $g.object, $g.charpos else - printf " pos=%d", $g->charpos + printf " pos=%d", $g.charpos end # For characters, print their resolved level and bidi type - if ($g->type == 0) - printf " blev=%d,btyp=", $g->resolved_level - pbiditype $g->bidi_type + if ($g.type == 0) + printf " blev=%d,btyp=", $g.resolved_level + pbiditype $g.bidi_type end - printf " w=%d a+d=%d+%d", $g->pixel_width, $g->ascent, $g->descent + printf " w=%d a+d=%d+%d", $g.pixel_width, $g.ascent, $g.descent # If not DEFAULT_FACE_ID - if ($g->face_id != 0) - printf " face=%d", $g->face_id + if ($g.face_id != 0) + printf " face=%d", $g.face_id end - if ($g->voffset) - printf " vof=%d", $g->voffset + if ($g.voffset) + printf " vof=%d", $g.voffset end - if ($g->multibyte_p) + if ($g.multibyte_p) printf " MB" end - if ($g->padding_p) + if ($g.padding_p) printf " PAD" end - if ($g->glyph_not_available_p) + if ($g.glyph_not_available_p) printf " N/A" end - if ($g->overlaps_vertically_p) + if ($g.overlaps_vertically_p) printf " OVL" end - if ($g->avoid_cursor_p) + if ($g.avoid_cursor_p) printf " AVOID" end - if ($g->left_box_line_p) + if ($g.left_box_line_p) printf " [" end - if ($g->right_box_line_p) + if ($g.right_box_line_p) printf " ]" end - if ($g->slice.img.x || $g->slice.img.y || $g->slice.img.width || $g->slice.img.height) - printf " slice=%d,%d,%d,%d" ,$g->slice.img.x, $g->slice.img.y, $g->slice.img.width, $g->slice.img.height + if ($g.slice.img.x || $g.slice.img.y || $g.slice.img.width || $g.slice.img.height) + printf " slice=%d,%d,%d,%d" ,$g.slice.img.x, $g.slice.img.y, $g.slice.img.width, $g.slice.img.height end printf "\n" end diff --git a/src/ChangeLog b/src/ChangeLog index 97b727929de..835e70f99af 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-09-18 Eli Zaretskii + + * .gdbinit (pgx): Fix references to fields of `struct glyph'. + 2011-09-17 Eli Zaretskii * xdisp.c (produce_stretch_glyph): Another fix for changes made on diff --git a/src/xdisp.c b/src/xdisp.c index f889815fa1e..b12fd6e591c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18703,11 +18703,6 @@ display_line (struct it *it) it->current_x = new_x; it->continuation_lines_width += new_x; ++it->hpos; - /* Record the maximum and minimum buffer - positions seen so far in glyphs that will be - displayed by this row. */ - if (it->bidi_p) - RECORD_MAX_MIN_POS (it); if (i == nglyphs - 1) { /* If line-wrap is on, check if a previous @@ -18722,6 +18717,11 @@ display_line (struct it *it) || IT_DISPLAYING_WHITESPACE (it))) goto back_to_wrap; + /* Record the maximum and minimum buffer + positions seen so far in glyphs that will be + displayed by this row. */ + if (it->bidi_p) + RECORD_MAX_MIN_POS (it); set_iterator_to_next (it, 1); if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) { @@ -18739,6 +18739,8 @@ display_line (struct it *it) } } } + else if (it->bidi_p) + RECORD_MAX_MIN_POS (it); } else if (CHAR_GLYPH_PADDING_P (*glyph) && !FRAME_WINDOW_P (it->f)) @@ -18869,6 +18871,10 @@ display_line (struct it *it) xassert (it->first_visible_x <= it->last_visible_x); } } + /* Even if this display element produced no glyphs at all, + we want to record its position. */ + if (it->bidi_p && nglyphs == 0) + RECORD_MAX_MIN_POS (it); row->ascent = max (row->ascent, it->max_ascent); row->height = max (row->height, it->max_ascent + it->max_descent);