Subject: bug#18285: 24.3.92; A combination of `display' on text and `invisible' and `before/after-string' leads to the before/after string being displayed twice

From: Dmitry Gutov <[email-masked]>
Date: Sun, 24 Aug 2014 06:48:13 +0400

On 08/24/2014 06:40 AM, Eli Zaretskii wrote:

>> And now I know why that was: `display' doesn't work on empty overlays,
>> but `before-string' and `after-string' do. That means +1 workaround.
>
> Bu empty overlays don't need invisible at all, so I don't see a
> problem.

The only problem is, I now need to use `after-string' or `display', 
depending on the context. Which is a small one, as far as problems go.

       (if (/= (overlay-start ov) (overlay-end ov))
           (overlay-put ov 'display disp)
         (overlay-put ov 'after-string disp))