GNU bug report logs - #68793
29.2; Visual line mode line spacing text property

Previous Next

Package: emacs;

Reported by: Psionic K <psionik <at> positron.solutions>

Date: Mon, 29 Jan 2024 06:25:01 UTC

Severity: normal

Tags: notabug

Found in version 29.2

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #10 received at control <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Psionic K <psionik <at> positron.solutions>
Cc: 68793 <at> debbugs.gnu.org
Subject: Re: bug#68793: 29.2; Visual line mode line spacing text property
Date: Mon, 29 Jan 2024 14:30:16 +0200
tags 68793 notabug
thanks

> From: Psionic K <psionik <at> positron.solutions>
> Date: Mon, 29 Jan 2024 15:23:33 +0900
> 
> In visual line mode, setting `line-spacing' and `line-height' text
> property on whole lines only correctly displays lines terminating in a
> newline
> 
> Steps to reproduce:
> 
> 1. open a buffer in fundamental mode
> 2. M-x visual line mode
> 3. Write a bunch of text with no newlines
> 4. Evaluate (add-text-properties (mark) (point) '(line-spacing 2.0))
> 5. Press RET somewhere in the paragraph or at the end
> 
> Observe that only the line that terminates in newline respects the
> property and that this does not respect user intent with
> visual-line-mode.

This is the documented behavior.  From the ELisp manual:

     Finally, a newline can have a ‘line-spacing’ text or overlay property
  that can enlarge the default frame line spacing and the buffer local
  ‘line-spacing’ variable: if its value is larger than the buffer or frame
  defaults, that larger value is used instead, for the display line ending
  in that newline                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ^^^^^^^^^^^^^^^

Note the part I underlined.  Only the last display line
(a.k.a. "screen line") preceding the newline is affected.  The same
happens without visual-line-mode, btw: only the last continuation line
has the line-spacing applied to it.

This is not a bug, surprising as it might be.




This bug report was last modified 290 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.