Alternative lead overlay creation strategy #208
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I originally intended to squelch a visual discrepancy, namely the fontification of the newline when the lead overlay is positioned before an empty line:
but ended up doing a bit more. Specifically, an empty overlay is created when it is to be placed in an empty buffer, positioned before a tab or positioned before a newline. This has some advantages.
In the case of the empty buffer, the buffer doesn't need to be modified to place the overlay. In the case of the tab, the overlay doesn't horizontally shift the line when the character width (font height) of the lead face differs from that of the underlying face (see screenshot below, indented lines stay vertically aligned). In the case of the newline. Well, mmm, one doesn't need to add a newline to the path? It certainly squelches my visual discrepancy.
Additionally, a priority is specified to prevent fighting with other overlays, see #98 and #178 and a similar issue with
show-smartparens-mode
(see screenshot below, the overlay isn't affected by smartparens).I have assigned copyright.