[Top][All Lists]

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

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

From: Stefan Monnier
Subject: Re: Line height issues with display-line-number-mode
Date: Wed, 08 May 2019 11:04:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> We tried this in magit, getting the line to extend to the edge of the
> window is not so obvious. But we did get something working in the end.
> Here it is as a patch against describe-symbol:
> --- 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.

Also, in the case of *vc-log* this would basically turn the "0.1" thick
black line into a thinner black line with a thicker "white" line above,
and that white line looks a bit odd there.  I guess strike-through would
look a bit better.

So, I'm not sure it's a good alternative (both in terms of code and in
terms of aesthetics) for log-edit-mode.


reply via email to

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