emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117615: * xdisp.c (erase_phys_cursor): Fix confu


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] emacs-24 r117615: * xdisp.c (erase_phys_cursor): Fix confusion between window-relative and text area-relative x-coordinates. [Backport]
Date: Wed, 22 Oct 2014 01:39:55 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117615
revision-id: address@hidden
parent: address@hidden
committer: YAMAMOTO Mitsuharu <address@hidden>
branch nick: emacs-24
timestamp: Wed 2014-10-22 10:39:48 +0900
message:
  * xdisp.c (erase_phys_cursor): Fix confusion between window-relative and text 
area-relative x-coordinates.  [Backport]
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-10-22 01:31:37 +0000
+++ b/src/ChangeLog     2014-10-22 01:39:48 +0000
@@ -2,6 +2,8 @@
 
        * xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
        [Backport]
+       (erase_phys_cursor): Fix confusion between window-relative and
+       text area-relative x-coordinates.  [Backport]
 
 2014-10-20  Glenn Morris  <address@hidden>
 

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2014-10-22 01:31:37 +0000
+++ b/src/xdisp.c       2014-10-22 01:39:48 +0000
@@ -27467,7 +27467,7 @@
   /* Maybe clear the display under the cursor.  */
   if (w->phys_cursor_type == HOLLOW_BOX_CURSOR)
     {
-      int x, y, left_x;
+      int x, y;
       int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
       int width;
 
@@ -27476,13 +27476,15 @@
        goto mark_cursor_off;
 
       width = cursor_glyph->pixel_width;
-      left_x = window_box_left_offset (w, TEXT_AREA);
       x = w->phys_cursor.x;
-      if (x < left_x)
-       width -= left_x - x;
+      if (x < 0)
+       {
+         width += x;
+         x = 0;
+       }
       width = min (width, window_box_width (w, TEXT_AREA) - x);
       y = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, cursor_row->y));
-      x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, max (x, left_x));
+      x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, x);
 
       if (width > 0)
        FRAME_RIF (f)->clear_frame_area (f, x, y, width, 
cursor_row->visible_height);


reply via email to

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