emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r117789: Fix cursor drawing in hscrolled R2L screen


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r117789: Fix cursor drawing in hscrolled R2L screen lines.
Date: Sun, 31 Aug 2014 15:47:25 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117789
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2014-08-31 18:46:47 +0300
message:
  Fix cursor drawing in hscrolled R2L screen lines.
  
   src/xdisp.c (get_glyph_string_clip_rects): Don't let the width of a
   clipping rectangle become negative (i.e. large positive, since
   it's an unsigned data type).  This can happen in R2L hscrolled
   glyph rows, and caused us to draw the cursor glyph on the fringe.
   For the details, see
   http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-08-31 02:40:00 +0000
+++ b/src/ChangeLog     2014-08-31 15:46:47 +0000
@@ -1,3 +1,12 @@
+2014-08-31  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (get_glyph_string_clip_rects): Don't let the width of a
+       clipping rectangle become negative (i.e. large positive, since
+       it's an unsigned data type).  This can happen in R2L hscrolled
+       glyph rows, and caused us to draw the cursor glyph on the fringe.
+       For the details, see
+       http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html.
+
 2014-08-31  Ken Brown  <address@hidden>
 
        * gmalloc.c: Don't include <stdlib.h>.  Declare system malloc and

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2014-08-28 14:48:02 +0000
+++ b/src/xdisp.c       2014-08-31 15:46:47 +0000
@@ -2174,7 +2174,10 @@
 
       if (s->x > r.x)
        {
-         r.width -= s->x - r.x;
+         if (r.width >= s->x - r.x)
+           r.width -= s->x - r.x;
+         else  /* R2L hscrolled row with cursor outside text area */
+           r.width = 0;
          r.x = s->x;
        }
       r.width = min (r.width, glyph->pixel_width);


reply via email to

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