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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 03 Dec 2012 20:08:35 +0200

> From: "Drew Adams" <[email-masked]>
> Cc: <[email-masked]>, <[email-masked]>
> Date: Mon, 3 Dec 2012 08:44:39 -0800
> 
> > So does anyone object to lifting this limitation, even though it might
> > degrade the quality of displaying the first and the last characters in
> > the run of characters that have the box face?
> 
> It's not obvious to me what that means for users.  Why don't you post before and
> after images so we can judge?

The examples I have don't show any significant effect.  But I can
explain how you can experiment and see yourself.

Evaluate this:

  (custom-set-variables '(global-hl-line-mode t))
  (custom-set-faces '(hl-line ((t (:box (:line-width -1 :color "gray50"))))))

Then visit any files you like, and move cursor vertically.  You will
see that the text of the current line moves 1 pixel to the right when
you move cursor into that line.  This 1-pixel move is to leave enough
space for the 1-pixel border of the box on the left side of the line,
so that the first character is displayed with all its pixels visible.

The change that is being requested here is to prevent that 1-pixel
shift, which means the box border will be drawn ON the left-most
character, obscuring some of its pixels on the left.

For a more prominent effect, replace -1 above with -4.

> And what is the tradeoff for this "degrading"?  What are users gaining by this
> sacrifice?

The gain is that, with the above settings in effect, the text of a
line will not shift to the left when cursor moves into that line.