Repository navigation
fix(editor): reveal image and video marks on the cursor line - #191
Merged
Merged
Conversation
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.
With the cursor on the line of a block image or a video card, the view skips the ornament for that line (it should) but the mark itself stayed shrunk to about a pixel, so the line looked empty while
imagegapkept reserving its 144 px below it. Nothing to read, nothing to click.The decoration pass now knows when the cursor sits on a block image or video line. In that case it reveals the marks of that line and skips the
imagegap/youtubegapspan, so the reservation collapses and the rawsits where the picture was. Moving the cursor away brings the ornament back.This follows the constraint from
gtk_hides_invisible_safely(): nothing is hidden or unhidden, the mark is shown by not shrinking it.Tests:
tests/image_reveal.rs(ignored, runs under xvfb) checks the tags for both cases, image and video, with the cursor inside and outside the line. Verified red before the fix (imagegapplussyn_shrink) and green after.Closes #185.