bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#42307: Feature request: Visual block attribute for overlays


From: Gregory Heytings
Subject: bug#42307: Feature request: Visual block attribute for overlays
Date: Fri, 10 Jul 2020 18:57:16 +0000
User-agent: Alpine 2.21 (NEB 202 2017-01-01)



If you take the algorithm, it would start on the "u", extend to the place it extends on the picture on the right, and on the next lines two whitespace characters on the left would not be displayed as green anymore (that is, the green area would start under the "f" of "(if".

Why is that? That starting position of the second line's highlight doesn't correspond to anything "natural", does it? I would expect either that it starts as it does now, directly under the `(' of the first line, or directly under the `u' that started the overlay.


In fact it does, the overlay goes upwards above the comment below the "f" of "(if". I attach a new picture between two arbitrary points that are not brackets. I don't see any other way to define in simple terms how the whitespace on the left should be trimmed. The "visualblock" would thus highlight all the text of the block between overlay-begin and overlay-end, and would be a rectangle except for the first and last lines, that is, except before overlay-begin and after overlay-end.


In any case, overlays, and highlighting, are not just for code.


Indeed. I think the proposed "visualblock" attribute is general and simple enough that it could be used not only for code. E.g. it can be used to highlight a portion of text with whitespace on the left, a TODO item, say.

Gregory

Attachment: visualblock-2.png
Description: PNG image


reply via email to

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