unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40507: 26.2; truncate-lines does not respect line-height
@ 2020-04-08 13:51 ndame
  2020-04-08 14:16 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: ndame @ 2020-04-08 13:51 UTC (permalink / raw)
  To: 40507

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

The manual says:

‘line-height’
     A newline can have a ‘line-height’ text or overlay property that
     controls the total height of the display line ending in that
     newline.  *Note Line Height::.

If you set this for a bunch of lines then it properly adds spacing to those lines.

But if you have long lines in the buffer and   (setq truncate-lines t) then 
all lines will be properly spaced, except for the long lines, because the 
newline is out of screen.

Even if the newline is not on screen, it should affect the height of the truncated 
line, because that's why the package developer added line-height to the newline,
so the  line has some spacing.
 
 

[-- Attachment #2: Type: text/html, Size: 882 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#40507: 26.2; truncate-lines does not respect line-height
  2020-04-08 13:51 bug#40507: 26.2; truncate-lines does not respect line-height ndame
@ 2020-04-08 14:16 ` Eli Zaretskii
  2020-04-08 14:31   ` ndame
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2020-04-08 14:16 UTC (permalink / raw)
  To: ndame; +Cc: 40507

severity 40507 wishlist
thanks

> From: ndame <emacsuser@freemail.hu>
> Date: Wed,  8 Apr 2020 15:51:09 +0200 (CEST)
> 
> Even if the newline is not on screen, it should affect the height of the truncated 
> line, because that's why the package developer added line-height to the newline,
> so the  line has some spacing.

That's not what this feature was designed for.  It is conceptually the
same as having a character in a line whose height is greater than
those of others: the line's hight will be increased only if that
taller character is displayed.

The line-height property you put on a newline is basically a means to
force the newline character have some specified height, even though
the newline doesn't have a glyph with a definite metrics.  That's why
this property is placed on a newline, not on any other character.

In terms of the implementation, the feature you expected would require
the display engine consider characters that are not visible in the
window, something that the display code tries hard to avoid doing (so
it could be faster).





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#40507: 26.2; truncate-lines does not respect line-height
  2020-04-08 14:16 ` Eli Zaretskii
@ 2020-04-08 14:31   ` ndame
  0 siblings, 0 replies; 3+ messages in thread
From: ndame @ 2020-04-08 14:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 40507@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

> In terms of the implementation, the feature you expected would require
> the display engine consider characters that are not visible in the
> window, something that the display code tries hard to avoid doing (so
> it could be faster).

I understand there can be performance implications. It may be worth some
additional lines in the manual that it has an effect only if the newline is 
actually on the screen. (Maybe obvious, but I expected it to have an effect.)

And also the workaround could be mentioned that the user can place a 
display line-height property to some other character on the line (preferably
a space, so it doesn't affect the text appearance) which has the same effect.

[-- Attachment #2: Type: text/html, Size: 787 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-08 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-08 13:51 bug#40507: 26.2; truncate-lines does not respect line-height ndame
2020-04-08 14:16 ` Eli Zaretskii
2020-04-08 14:31   ` ndame

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).