emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c


From: Steven Tamm
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c
Date: Mon, 24 Jan 2005 12:59:42 -0500

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.970 emacs/src/xdisp.c:1.971
*** emacs/src/xdisp.c:1.970     Mon Jan 24 13:17:51 2005
--- emacs/src/xdisp.c   Mon Jan 24 17:59:35 2005
***************
*** 1786,1791 ****
--- 1786,1809 ----
        r.height = s->row->visible_height;
      }
  
+   if (s->clip_head)
+     if (r.x < s->clip_head->x)
+       {
+       if (r.width >= s->clip_head->x - r.x)
+         r.width -= s->clip_head->x - r.x;
+       else
+         r.width = 0;
+       r.x = s->clip_head->x;
+       }
+   if (s->clip_tail)
+     if (r.x + r.width > s->clip_tail->x + s->clip_tail->background_width)
+       {
+       if (s->clip_tail->x + s->clip_tail->background_width >= r.x)
+         r.width = s->clip_tail->x + s->clip_tail->background_width - r.x;
+       else
+         r.width = 0;
+       }
+ 
    /* If S draws overlapping rows, it's sufficient to use the top and
       bottom of the window for clipping because this glyph string
       intentionally draws over other lines.  */
***************
*** 18233,18238 ****
--- 18251,18257 ----
  {
    struct glyph_string *head, *tail;
    struct glyph_string *s;
+   struct glyph_string *clip_head = NULL, *clip_tail = NULL;
    int last_x, area_width;
    int x_reached;
    int i, j;
***************
*** 18301,18306 ****
--- 18320,18326 ----
          start = i;
          compute_overhangs_and_x (t, head->x, 1);
          prepend_glyph_string_lists (&head, &tail, h, t);
+         clip_head = head;
        }
  
        /* Prepend glyph strings for glyphs in front of the first glyph
***************
*** 18313,18318 ****
--- 18333,18339 ----
        i = left_overwriting (head);
        if (i >= 0)
        {
+         clip_head = head;
          BUILD_GLYPH_STRINGS (i, start, h, t,
                               DRAW_NORMAL_TEXT, dummy_x, last_x);
          for (s = h; s; s = s->next)
***************
*** 18332,18337 ****
--- 18353,18359 ----
                               DRAW_NORMAL_TEXT, x, last_x);
          compute_overhangs_and_x (h, tail->x + tail->width, 0);
          append_glyph_string_lists (&head, &tail, h, t);
+         clip_tail = tail;
        }
  
        /* Append glyph strings for glyphs following the last glyph
***************
*** 18342,18347 ****
--- 18364,18370 ----
        i = right_overwriting (tail);
        if (i >= 0)
        {
+         clip_tail = tail;
          BUILD_GLYPH_STRINGS (end, i, h, t,
                               DRAW_NORMAL_TEXT, x, last_x);
          for (s = h; s; s = s->next)
***************
*** 18349,18354 ****
--- 18372,18383 ----
          compute_overhangs_and_x (h, tail->x + tail->width, 0);
          append_glyph_string_lists (&head, &tail, h, t);
        }
+       if (clip_head || clip_tail)
+       for (s = head; s; s = s->next)
+         {
+           s->clip_head = clip_head;
+           s->clip_tail = clip_tail;
+         }
      }
  
    /* Draw all strings.  */
***************
*** 18362,18369 ****
         completely. */
        && !overlaps_p)
      {
!       int x0 = head ? head->x : x;
!       int x1 = tail ? tail->x + tail->background_width : x;
  
        int text_left = window_box_left (w, TEXT_AREA);
        x0 -= text_left;
--- 18391,18399 ----
         completely. */
        && !overlaps_p)
      {
!       int x0 = clip_head ? clip_head->x : (head ? head->x : x);
!       int x1 = (clip_tail ? clip_tail->x + clip_tail->background_width
!               : (tail ? tail->x + tail->background_width : x));
  
        int text_left = window_box_left (w, TEXT_AREA);
        x0 -= text_left;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]