GNU bug report logs - #21835
25.0.50; cursor height wrong when line-spacing is used

Previous Next

Package: emacs;

Reported by: David Reitter <david.reitter <at> gmail.com>

Date: Thu, 5 Nov 2015 04:22:01 UTC

Severity: minor

Found in version 25.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: David Reitter <david.reitter <at> gmail.com>
Cc: 21835 <at> debbugs.gnu.org
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 <at> gmail.com>
> Date: Thu, 5 Nov 2015 22:12:03 -0500
> Cc: 21835 <at> 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.




This bug report was last modified 9 years and 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.