Subject: bug#13011: 24.2; Text flickering moving cursor with box around text enabled

From: Eli Zaretskii <[email-masked]>
Date: Wed, 28 Nov 2012 19:54:23 +0200

[Please keep the bug address on the CC list.]

> Date: Wed, 28 Nov 2012 16:14:53 +0100
> From: mario giovinazzo <[email-masked]>
> 
> To reproduce the behavior is very easy.
> My .emacs file contains only this 2  lines:
> 
> 
> (custom-set-variables '(global-hl-line-mode t))
> (custom-set-faces '(hl-line ((t (:box (:line-width 1 :color "gray50"))))))

Thanks.

> If you open any text file and move the cursor inside text with arrow key
> (up, down, right, left), the" box around text" follow the cursor,
> and the text flickers (I suppose +- 2 pixels). It is evident.

I see no flickering when moving cursor horizontally within the same
screen line.  None at all.

When moving cursor vertically, I see this:

  . The text of the current line moves slightly up when the current
    line moves up or down.

  . When the current line is empty, the text in all the lines below it
    moves up slightly, then moves back down when the current lines
    becomes a line with some text.

Is this what you call "flicker"?  Or do you see something else?

If the above is what you see, then please tell what you expect Emacs
to do instead.  You've changed the face of the current line such that
it takes slightly more pixels on the screen.  Emacs just obeys your
specifications, it cannot display a line in less pixels than it needs
to draw all of the characters on it in the face you requested.  The
same would happen if you set the hl-line face to use a larger font,
for example.