emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Line height issues with display-line-number-mode


From: Noam Postavsky
Subject: Re: Line height issues with display-line-number-mode
Date: Wed, 8 May 2019 14:39:42 -0400

On Wed, 8 May 2019 at 11:04, Stefan Monnier <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]