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,v


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c,v
Date: Thu, 14 Sep 2006 09:37:44 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kim F. Storm <kfstorm>  06/09/14 09:37:44

Index: xdisp.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1120
retrieving revision 1.1121
diff -u -b -r1.1120 -r1.1121
--- xdisp.c     10 Sep 2006 00:10:46 -0000      1.1120
+++ xdisp.c     14 Sep 2006 09:37:44 -0000      1.1121
@@ -19786,7 +19786,7 @@
 {
   struct image *img;
   struct face *face;
-  int glyph_ascent;
+  int glyph_ascent, crop;
   struct glyph_slice slice;
 
   xassert (it->what == IT_IMAGE);
@@ -19894,6 +19894,15 @@
 
   take_vertical_position_into_account (it);
 
+  /* Automatically crop wide image glyphs at right edge so we can
+     draw the cursor on same display row.  */
+  if ((crop = it->pixel_width - (it->last_visible_x - it->current_x), crop > 0)
+      && (it->hpos == 0 || it->pixel_width > it->last_visible_x / 4))
+    {
+      it->pixel_width -= crop;
+      slice.width -= crop;
+    }
+
   if (it->glyph_row)
     {
       struct glyph *glyph;




reply via email to

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