[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.
Stefan
- Re: Line height issues with display-line-number-mode, (continued)
- Re: Line height issues with display-line-number-mode, Noam Postavsky, 2019/05/07
- Re: Line height issues with display-line-number-mode, Eli Zaretskii, 2019/05/07
- Re: Line height issues with display-line-number-mode, Eli Zaretskii, 2019/05/07
- Re: Line height issues with display-line-number-mode, Stefan Monnier, 2019/05/07
- Re: Line height issues with display-line-number-mode, Eli Zaretskii, 2019/05/07
- Re: Line height issues with display-line-number-mode, Stefan Monnier, 2019/05/07
- Re: Line height issues with display-line-number-mode, Eli Zaretskii, 2019/05/08
- Re: Line height issues with display-line-number-mode, Stefan Monnier, 2019/05/08
- Re: Line height issues with display-line-number-mode, Eli Zaretskii, 2019/05/08
- Re: Line height issues with display-line-number-mode, Noam Postavsky, 2019/05/08
- Re: Line height issues with display-line-number-mode,
Stefan Monnier <=
- Re: Line height issues with display-line-number-mode, Noam Postavsky, 2019/05/08
- Re: Line height issues with display-line-number-mode, Eli Zaretskii, 2019/05/08
- Re: Line height issues with display-line-number-mode, Kévin Le Gouguec, 2019/05/10
- Re: Line height issues with display-line-number-mode, Eli Zaretskii, 2019/05/10
- Re: Line height issues with display-line-number-mode, Stefan Monnier, 2019/05/10
- Re: Line height issues with display-line-number-mode, Stefan Monnier, 2019/05/08
- Re: Line height issues with display-line-number-mode, Eli Zaretskii, 2019/05/08
- Re: Line height issues with display-line-number-mode, Stefan Monnier, 2019/05/08
- Re: Line height issues with display-line-number-mode, Eli Zaretskii, 2019/05/08
- Re: Line height issues with display-line-number-mode, Stefan Monnier, 2019/05/08