all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: David Reitter <david.reitter@gmail.com>
Cc: 21835@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	[thread overview]
Message-ID: <83fv0jsfw2.fsf@gnu.org> (raw)
In-Reply-To: <C916CD55-4F19-4DAC-85CB-F38C270D893C@gmail.com>

> 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.





  reply	other threads:[~2015-11-06  8:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05  4:21 bug#21835: 25.0.50; cursor height wrong when line-spacing is used David Reitter
2015-11-05 16:12 ` Eli Zaretskii
2015-11-06  3:12   ` David Reitter
2015-11-06  8:15     ` Eli Zaretskii [this message]
2015-11-06  9:31     ` Eli Zaretskii
2015-11-06 14:10   ` Stefan Monnier
2015-11-06 14:28     ` Eli Zaretskii
2016-03-21  4:03 ` Nick Helm
2016-03-21 15:58   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83fv0jsfw2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=21835@debbugs.gnu.org \
    --cc=david.reitter@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.