[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21835: 25.0.50; cursor height wrong when line-spacing is used
From: |
Eli Zaretskii |
Subject: |
bug#21835: 25.0.50; cursor height wrong when line-spacing is used |
Date: |
Fri, 06 Nov 2015 10:15:09 +0200 |
> From: David Reitter <david.reitter@gmail.com>
> Date: Thu, 5 Nov 2015 22:12:03 -0500
> Cc: 21835@debbugs.gnu.org
>
> One could default to the height of the last glyph of the line. Normally, we
> would expect the size of the cursor to indicate the general height of the
> text that would be inserted there, and the last glyph is the best guess.
I tried that, and it was worse. The problem is, the last glyph could
have very small height, at least with some fonts. Then you have a
very small cursor at the end. What's more, as you type at EOL, the
cursor height will constantly change.
> Alternatively, use the line height for all cursor positions in that line. In
> that case, things would still need to be adjusted for `line-spacing’, and
> based on what you wrote, I think that’s less preferable.
Indeed. Our cursor, when it is drawn on a character, shows the
dimensions of that character, both horizontal and vertical. Losing
that, even only for the vertical dimension, would be a step backward,
I think.
There are also differences in how we draw the hollow cursor (in
non-selected windows) vs the cursor in selected windows. They should
have the same dimensions, or else it will look like a bug. The
solution I coded solves this problem as well (some other ideas
didn't).
So once again, I don't know of any better way of solving this.