all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>, Emacs developers <emacs-devel@gnu.org>
Subject: Re: Line height issues with display-line-number-mode
Date: Wed, 8 May 2019 14:39:42 -0400	[thread overview]
Message-ID: <CAM-tV-8XfSsj9M0FG8KYwc6NkVrSguwA_8YPmNxg9kmTpU9pAg@mail.gmail.com> (raw)
In-Reply-To: <jwv1s19uh7m.fsf-monnier+emacs@gnu.org>

On Wed, 8 May 2019 at 11:04, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > --- i/lisp/help-fns.el
> > +++ w/lisp/help-fns.el
> > @@ -1257,7 +1257,17 @@ describe-symbol
> >                             (progn (skip-chars-backward " \t\n") (point)))
> >              (insert "\n\n"
> >                      (eval-when-compile
> > -                      (propertize "\n" 'face '(:height 0.1 :inverse-video t)))
> > +                      (propertize
> > +                       "\n" 'face '(:underline t)
> > +                       'display `(space
> > +                                  :align-to
> > +                                  (+ (0 . right)
> > +                                     ,(min (window-hscroll)
> > +                                           (- (line-end-position)
> > +                                              (line-beginning-position)))))
> > +                       ;; This prevents the cursor from being rendered at the
> > +                       ;; edge of the window.
> > +                       'cursor t))
>
> That align-to computation looks brittle (and still incorrect, I think)
> and it hardcodes into the text-property a value which can change later
> (window-hscroll), so it's rather problematic.

Yes, in magit this is recomputed from
redisplay-highlight-region-function, which keeps the value up to date,
but has it's own problems (e.g., inf looping in redisplay Bug#24633,
this is what `min' works around). I guess for *Help* buffers there's
not much use in hscrolling, so using just '(space :align-to right)
would be fine.



  reply	other threads:[~2019-05-08 18:39 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07 16:40 Line height issues with display-line-number-mode Clément Pit-Claudel
2019-05-07 17:12 ` Noam Postavsky
2019-05-07 18:36   ` Eli Zaretskii
2019-05-07 19:00     ` Eli Zaretskii
2019-05-07 19:09       ` Stefan Monnier
2019-05-07 19:43         ` Eli Zaretskii
2019-05-07 20:30           ` Stefan Monnier
2019-05-08  6:43             ` Eli Zaretskii
2019-05-08 13:39               ` Stefan Monnier
2019-05-08 14:05                 ` Eli Zaretskii
2019-05-08 14:13                   ` Noam Postavsky
2019-05-08 15:04                     ` Stefan Monnier
2019-05-08 18:39                       ` Noam Postavsky [this message]
2019-05-08 18:54                         ` Eli Zaretskii
2019-05-10  6:15                           ` Kévin Le Gouguec
2019-05-10  7:58                             ` Eli Zaretskii
2019-05-10 13:24                             ` Stefan Monnier
2019-05-08 14:17                   ` Stefan Monnier
2019-05-08 17:30                     ` Eli Zaretskii
2019-05-08 17:46                       ` Stefan Monnier
2019-05-08 18:02                         ` Eli Zaretskii
2019-05-08 18:39                           ` Stefan Monnier
2019-05-08 18:48                             ` Eli Zaretskii
2019-05-08 19:03                               ` Stefan Monnier
2019-05-07 19:49         ` Ergus
2019-05-08  5:51           ` Eli Zaretskii
2019-05-08 13:40             ` Stefan Monnier
2019-05-08 14:07               ` Eli Zaretskii
2019-05-07 18:31 ` Eli Zaretskii
2019-05-07 21:08   ` Clément Pit-Claudel
2019-05-08  7:01     ` Eli Zaretskii
2019-05-08 12:24       ` Clément Pit-Claudel
2019-05-08 14:00         ` Eli Zaretskii
2019-05-08 18:04           ` Clément Pit-Claudel
2019-05-08 18:25             ` Eli Zaretskii
2019-05-08 18:45             ` Stefan Monnier

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=CAM-tV-8XfSsj9M0FG8KYwc6NkVrSguwA_8YPmNxg9kmTpU9pAg@mail.gmail.com \
    --to=npostavs@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.