]> git.eshelyaron.com Git - emacs.git/commitdiff
Force screen update after drawing cursor glyph (bug#23774)
authorAlan Third <alan@idiocy.org>
Sun, 3 Sep 2017 12:51:14 +0000 (13:51 +0100)
committerAlan Third <alan@idiocy.org>
Sun, 3 Sep 2017 12:54:18 +0000 (13:54 +0100)
* src/nsterm.m (ns_draw_window_cursor): Force a screen update after
drawing the glyph over the cursor.

src/nsterm.m

index ff3329d1cee3a6bff0eaae5ecfeefcd390df95b4..6b0e18bf439028e636cee4b2d719effd0f2e7864 100644 (file)
@@ -3143,7 +3143,16 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
 
   /* draw the character under the cursor */
   if (cursor_type != NO_CURSOR)
-    draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR);
+    {
+      draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR);
+
+#ifdef NS_IMPL_COCOA
+      /* The glyph under the cursor isn't displayed when switching
+         spaces, so force an update.  This seems to be related to the
+         use of NSDisableScreenUpdates.  */
+      [FRAME_NS_VIEW (f) setNeedsDisplay:YES];
+#endif
+    }
 
 #ifdef NS_IMPL_COCOA
   NSEnableScreenUpdates ();