/[emacs]/emacs/src/xdisp.c
ViewVC logotype

Diff of /emacs/src/xdisp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.972 by kfstorm, Mon Jan 24 20:44:39 2005 UTC revision 1.973 by kfstorm, Thu Jan 27 00:16:28 2005 UTC
# Line 1837  get_glyph_string_clip_rect (s, nr) Line 1837  get_glyph_string_clip_rect (s, nr)
1837    if (s->hl == DRAW_CURSOR)    if (s->hl == DRAW_CURSOR)
1838      {      {
1839        struct glyph *glyph = s->first_glyph;        struct glyph *glyph = s->first_glyph;
1840        int height;        int height, max_y;
1841    
1842        if (s->x > r.x)        if (s->x > r.x)
1843          {          {
# Line 1846  get_glyph_string_clip_rect (s, nr) Line 1846  get_glyph_string_clip_rect (s, nr)
1846          }          }
1847        r.width = min (r.width, glyph->pixel_width);        r.width = min (r.width, glyph->pixel_width);
1848    
1849        /* Don't draw cursor glyph taller than our actual glyph.  */        /* If r.y is below window bottom, ensure that we still see a cursor.  */
1850        height = max (FRAME_LINE_HEIGHT (s->f), glyph->ascent + glyph->descent);        height = min (glyph->ascent + glyph->descent,
1851        if (height < r.height)                      min (FRAME_LINE_HEIGHT (s->f), s->row->visible_height));
1852          max_y = window_text_bottom_y (s->w) - height;
1853          max_y = WINDOW_TO_FRAME_PIXEL_Y (s->w, max_y);
1854          if (s->ybase - glyph->ascent > max_y)
1855          {          {
1856            int max_y = r.y + r.height;            r.y = max_y;
1857            r.y = min (max_y, s->ybase + glyph->descent - height);            r.height = height;
1858            r.height = min (max_y - r.y, height);          }
1859          else
1860            {
1861              /* Don't draw cursor glyph taller than our actual glyph.  */
1862              height = max (FRAME_LINE_HEIGHT (s->f), glyph->ascent + glyph->descent);
1863              if (height < r.height)
1864                {
1865                  max_y = r.y + r.height;
1866                  r.y = min (max_y, max (r.y, s->ybase + glyph->descent - height));
1867                  r.height = min (max_y - r.y, height);
1868                }
1869          }          }
1870      }      }
1871    

Legend:
Removed from v.1.972  
changed lines
  Added in v.1.973

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26