Alternative lead overlay creation strategy#208
Open
Koekelas wants to merge 1 commit into
Open
Conversation
An empty overlay is created when the buffer is empty (no need to modify the buffer), the overlay is positioned before a tab (no horizontal shift of the line when the character width of the lead face differs from that of the underlying face) or it is positioned before a new line. Additionally, only the path is fontified (no full width tab or line when the lead face specifies a background) and a priority is specified (no fighting with other overlays, see abo-abo#98 and abo-abo#178). * ace-window.el (aw--make-lead): New function. (aw--done, aw--lead-overlay): Adapt accordingly. (aw-empty-buffers-list, aw--overlay-str): Delete definitions.
protesilaos
added a commit
to protesilaos/modus-themes
that referenced
this pull request
Mar 7, 2021
The plan is to add a background colour to 'aw-leading-char-face', though this cannot be done before an issue with the overlay's properties is addressed upstream: <abo-abo/ace-window#208>. This commit follows from the discussion with Nicolas De Jaeghere in merge require 27: <https://gitlab.com/protesilaos/modus-themes/-/merge_requests/27>.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.