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: Kim F . Storm
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c
Date: Wed, 26 Jan 2005 19:16:28 -0500

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.972 emacs/src/xdisp.c:1.973
*** emacs/src/xdisp.c:1.972     Mon Jan 24 20:44:39 2005
--- emacs/src/xdisp.c   Thu Jan 27 00:16:28 2005
***************
*** 1837,1843 ****
    if (s->hl == DRAW_CURSOR)
      {
        struct glyph *glyph = s->first_glyph;
!       int height;
  
        if (s->x > r.x)
        {
--- 1837,1843 ----
    if (s->hl == DRAW_CURSOR)
      {
        struct glyph *glyph = s->first_glyph;
!       int height, max_y;
  
        if (s->x > r.x)
        {
***************
*** 1846,1858 ****
        }
        r.width = min (r.width, glyph->pixel_width);
  
!       /* Don't draw cursor glyph taller than our actual glyph.  */
!       height = max (FRAME_LINE_HEIGHT (s->f), glyph->ascent + glyph->descent);
!       if (height < r.height)
!       {
!         int max_y = r.y + r.height;
!         r.y = min (max_y, s->ybase + glyph->descent - height);
!         r.height = min (max_y - r.y, height);
        }
      }
  
--- 1846,1871 ----
        }
        r.width = min (r.width, glyph->pixel_width);
  
!       /* If r.y is below window bottom, ensure that we still see a cursor.  */
!       height = min (glyph->ascent + glyph->descent,
!                   min (FRAME_LINE_HEIGHT (s->f), s->row->visible_height));
!       max_y = window_text_bottom_y (s->w) - height;
!       max_y = WINDOW_TO_FRAME_PIXEL_Y (s->w, max_y);
!       if (s->ybase - glyph->ascent > max_y)
!       {
!         r.y = max_y;
!         r.height = height;
!       }
!       else
!       {
!         /* Don't draw cursor glyph taller than our actual glyph.  */
!         height = max (FRAME_LINE_HEIGHT (s->f), glyph->ascent + 
glyph->descent);
!         if (height < r.height)
!           {
!             max_y = r.y + r.height;
!             r.y = min (max_y, max (r.y, s->ybase + glyph->descent - height));
!             r.height = min (max_y - r.y, height);
!           }
        }
      }
  




reply via email to

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