]> git.eshelyaron.com Git - emacs.git/commitdiff
* xdisp.c (expose_window): Save original value of phys_cursor_on_p and turn window...
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sat, 10 Sep 2011 06:54:04 +0000 (15:54 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sat, 10 Sep 2011 06:54:04 +0000 (15:54 +0900)
src/ChangeLog
src/xdisp.c

index 52f41c4cd7361012e0316ccf9b96f5076681cbf8..fa31b3d6f0e1bd578ed92da97c52d61601b5a44d 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * xdisp.c (expose_window): Save original value of phys_cursor_on_p
+       and turn window cursor on if cleared (Bug#9415).
+
 2011-09-07  Andreas Schwab  <schwab@linux-m68k.org>
 
        * search.c (boyer_moore): Take unibyte characters from pattern
index b8a8ea7484dc370dbac2cb7bb2c2740967a75cb4..ebd660acc0615906ff17d1ee9cbf3ea79404e648 100644 (file)
@@ -24249,7 +24249,7 @@ expose_window (w, fr)
     {
       int yb = window_text_bottom_y (w);
       struct glyph_row *row;
-      int cursor_cleared_p;
+      int cursor_cleared_p, phys_cursor_on_p;
       struct glyph_row *first_overlapping_row, *last_overlapping_row;
 
       TRACE ((stderr, "expose_window (%d, %d, %d, %d)\n",
@@ -24269,6 +24269,13 @@ expose_window (w, fr)
       else
        cursor_cleared_p = 0;
 
+      /* If the row containing the cursor extends face to end of line,
+        then expose_area might overwrite the cursor outside the
+        rectangle and thus notice_overwritten_cursor might clear
+        w->phys_cursor_on_p.  We remember the original value and
+        check later if it is changed.  */
+      phys_cursor_on_p = w->phys_cursor_on_p;
+
       /* Update lines intersecting rectangle R.  */
       first_overlapping_row = last_overlapping_row = NULL;
       for (row = w->current_matrix->rows;
@@ -24335,7 +24342,8 @@ expose_window (w, fr)
          x_draw_vertical_border (w);
 
          /* Turn the cursor on again.  */
-         if (cursor_cleared_p)
+         if (cursor_cleared_p
+             || (phys_cursor_on_p && !w->phys_cursor_on_p))
            update_window_cursor (w, 1);
        }
     }