Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beacon does not show correctly on collapsed header in outline mode #77

Open
hpgisler opened this issue Nov 23, 2020 · 0 comments
Open

Comments

@hpgisler
Copy link

Situation

Let's say: In some Org-mode document, I have:

* Some Heading
Some content

If this outline is collapsed it looks like:

* Some Heading...

Observed Behavior

If point is positioned here:

* Some Heading...
              ^ 

Then no beacon is shown.

Note:

  • if point is positioned left of the position indicated by the '^', the beacon goes at most to the end of '...'
  • if point is positioned right of the '...' , the beacon shows in full, as expected

Expected behavior:

Independent of the position of point, the beacon size should always be the same amount of characters to the right of point.

antler5 pushed a commit to antler5/beacon that referenced this issue Jun 5, 2022
I don't consider this "done" yet, but am perhaps letting perfect be the
enemy of the good. The beacon does /show/ correctly, and I drop a few
spaces to make up for the ellipsis, but the rough edges are:

1. Said ellipsis is one long char, distorting the gradient; think I just
   gotta live with this one.
2. The face that org-mode uses for it's headers doesn't `:extend` to the
   overlay, so these blinks are much shorter than others. This is a
   broader situation, perhaps beyond the scope of this issue.
3. These blinks don't fade out smoothly, but vanish all at once.

Regarding nitpick 3:
- When `beacon-blink` is invoked from the char preceeding the ellipsis,
  `beacon-dec` is called only once; on an overlay from `point` to `(+
  (point) 1)` (just ahead of the invisible chars).
- `beacon--vanish` is then called with an overlay still present in
  `beacon--ovs`, located immediately after the invisible chars (eg. from
  1544-1544, not n-n+1).

I'm ignorant of exactly how overlays work, or how you're cleaning them
up so beautifully, but this looks like the most addressable shortcoming;
maybe you've got some insights on how the 'good path' works and where to
look to see what's going on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant