Subject: bug#20410: 24.5.50; cursor not updated after yank of non-ASCII string from the clipboard

From: YAMAMOTO Mitsuharu <[email-masked]>
Date: Sun, 26 Apr 2015 19:02:05 +0900

>>>>> On Sat, 25 Apr 2015 15:32:22 +0300, Eli Zaretskii <[email-masked]> said:

> Adjusting frame glyphs makes all glyph rows disabled, so various
> redisplay optimizations should be disabled.  In particular, new cursor
> position was correctly computed, but because it was on a disabled
> glyph row, display_and_set_cursor would not obey that new position,
> and exposing a window would not redraw the disabled glyph rows.

> 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.

				     YAMAMOTO Mitsuharu
				[email-masked]