]> git.eshelyaron.com Git - emacs.git/commitdiff
src/.gdbinit (pgx): Fix references to fields of `struct glyph'.
authorEli Zaretskii <eliz@gnu.org>
Sun, 18 Sep 2011 07:33:04 +0000 (03:33 -0400)
committerEli Zaretskii <eliz@gnu.org>
Sun, 18 Sep 2011 07:33:04 +0000 (03:33 -0400)
src/.gdbinit
src/ChangeLog
src/xdisp.c

index 0f51a00ea76da09c903fb0c7b1a388bf704f9c4f..b908ef005d69d9cb55b64b7e3653c3d77d55a0c7 100644 (file)
@@ -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
index 97b727929de521a089343cb97a43f33fff0feae8..835e70f99af25a67ff28e5df499be16677fe3cb3 100644 (file)
@@ -1,3 +1,7 @@
+2011-09-18  Eli Zaretskii  <eliz@gnu.org>
+
+       * .gdbinit (pgx): Fix references to fields of `struct glyph'.
+
 2011-09-17  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (produce_stretch_glyph): Another fix for changes made on
index f889815fa1e929cd43b4ad401c21f2820eba6b04..b12fd6e591c7c11ab1a96c96c233e392b6aa0b6d 100644 (file)
@@ -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);