Conversation
* Move posframe one line up, so its popup starts right after the hunk. * Add the same exception for `deletion` that inline-popup has. * Use `before-string` and `cursor` in inline popup, for correct positioning of it with `deletion` hunks as well. And of cursor, which it overlaps.
Couldn't reproduce the problem, and this code caused the original frame to be selected after several calls to diff-hl-show-hunk-next, for example (because after the first one diff-hl-show-hunk--frame becomes non-nil, so we got a timer which goes back to the original frame).
* Don't call diff-hl-show-hunk--posframe-hide when (re)showing hunk, let the rendering code take care of that. * Move point to beginning of indentation in diff-hl-show-hunk--goto-hunk-overlay. Less chance to trigger show-paren-mode highlights, and a more logical position anyway. * Don't select-frame-set-input-focus at the end of diff-hl-show-hunk-posframe. Removes the cursor blink between the frames, while keys and button pressed still get processed the same.
The avoids the big blank space when the hunk is short.
Owner
Author
|
Hi @wyuenho could you test out these changes as well? As I see you use the This should help me with progressing in the nearby PRs too. |
Contributor
|
Hi @dgutov , Im currently away of my computer, so i can not check these changres I will check them next week, but they look good to me. Feel free to merge them if you need it. |
Contributor
|
I've manually applied the patch to #228 with some small adjustments due to naming changes, it works well. However, I don't use show-hunk-posframe, so I only tested show-hunk-inline. Based on what I see, works well. |
Owner
Author
|
Thank you both, merging. |
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.
Hi @alvarogonzalezsotillo, please check this out if you have the time and you're still using the features.
I made a pass at the code to make the rendering backends more similar in behavior (wrt positioning), and less "blinky" with the posframe backend.
It removes a couple of workarounds which mention Gnome but I couldn't reproduce (with version 46 anyway) - to fix the side-effects, which both had. Would be great if you could test and see if those were still necessary.