GNU bug report logs - #20410
24.5.50; cursor not updated after yank of non-ASCII string from the clipboard

Previous Next

Package: emacs;

Reported by: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Date: Thu, 23 Apr 2015 10:01:02 UTC

Severity: normal

Found in version 24.5.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 20410 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Cc: 20410 <at> debbugs.gnu.org
Subject: Re: bug#20410: 24.5.50;
 cursor not updated after yank of non-ASCII string from the clipboard
Date: Sun, 26 Apr 2015 18:04:56 +0300
> Date: Sun, 26 Apr 2015 19:02:05 +0900
> From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
> Cc: 20410 <at> debbugs.gnu.org
> 
> > Does the patch below fix the problems you see?  (It might look a bit
> > drastic, but then loading new fonts is not supposed to be a frequent
> > operation, I think.)
> 
> Yes, it solves the problems as far as I tested.  But because
> adjust_frame_glyphs are called from many places other than font
> changes, I wonder if it might disable some cases where some
> optimizations were applied successfully otherwise (sorry, I don't have
> any ideas about concrete examples).  Some calls to adjust_frame_glyphs
> are already accompanied by SET_FRAME_GARBAGED, but not always.

Hmm... you are right, we could be more selective.  Does the
alternative patch below work for you?

diff --git a/src/xdisp.c b/src/xdisp.c
index 5a27adc..cbe46eb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13359,6 +13359,13 @@ static void debug_method_add (struct window *, char const *, ...)
 	  if (f->fonts_changed)
 	    {
 	      adjust_frame_glyphs (f);
+	      /* Disable all redisplay optimizations for this frame.
+		 This is because adjust_frame_glyphs resets the
+		 enabled_p flag for all glyph rows of all windows, so
+		 many optimizations will fail anyway, and some might
+		 fail to test that flag and do bogus things as
+		 result.  */
+	      SET_FRAME_GARBAGED (f);
 	      f->fonts_changed = false;
 	    }
 	  /* If cursor type has been changed on the frame
@@ -13753,6 +13760,10 @@ static void debug_method_add (struct window *, char const *, ...)
 		  if (f->fonts_changed)
 		    {
 		      adjust_frame_glyphs (f);
+		      /* Disable all redisplay optimizations for this
+			 frame.  See the comment for the previous call
+			 to adjust_frame_glyphs for the reasons.  */
+		      SET_FRAME_GARBAGED (f);
 		      f->fonts_changed = false;
 		      goto retry_frame;
 		    }




This bug report was last modified 10 years and 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.