Subject: Re: bug#10903: 24.0.93; redisplay glitch with before-string and display overlays

From: Stephen Berman <[email-masked]>
Date: Tue, 28 Feb 2012 23:25:13 +0100

On Tue, 28 Feb 2012 22:40:17 +0200 Eli Zaretskii <[email-masked]> wrote:

>> From: Stephen Berman <[email-masked]>
>> Date: Mon, 27 Feb 2012 23:04:03 +0100
>> 
>> 1. emacs -Q
>> 
>> 2. Type `C-x b a RET' to get a fresh buffer in Fundamental mode, and  at
>> (point-min) type "012".
>> 
>> 3. Type `M-<' so that the cursor is over (i.e. just before) `0'.
>> 
>> 4. Type `M-: (overlay-put (make-overlay (point) (point)) 'before-string
>> "*")'.  Now you see this:
>> 
>> *012
>> 
>> 5. Type `M-: (overlay-put (make-overlay (point) (1+ (point))) 'display
>> "")'.  Now you see this:
>> 
>> *12
>> 
>> 6. Type `M-: (remove-overlays)' to restore "012".
>> 
>> 7. Type SPC to advance the cursor and the start of "012" to column one.
>> 
>> 8. Repeat step 4.  Now you see this:
>> 
>>  *012
>> 
>> 9. Repeat step 5.  Now you see this:
>> 
>>  *112
>
> We were hitting on an old redisplay optimization that didn't play well
> with the bidi-aware display engine.
>
> I think I fixed this.  Thanks for such a clear-cut test case.
>
> Since Savannah is on the move, I cannot commit the fix, but perhaps
> you could test it locally and see if there are any leftovers.  Here's
> the patch:

I applied the patch and rebuilt, and the redisplay glitches I observed
are gone; thanks very much for the quick fix!  I consider this bug
resolved, but it should probably be closed after the fix is committed to
the trunk.  Thanks again.

Steve Berman