Link to line(s) of commit opens with first lines outside viewport #41843
Unanswered
ikonst
asked this question in
Code Search and Navigation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Bug
Body
A link to a line (or block of lines) in a commit opens the commit and then scrolls to the lightlighted lines but stops short of bringing them all into the viewport. Instead, a few of the first lines stay out of the viewport. In the case of a link to a single line, the entire highlighted line remains outside the viewport. When receiving such link, it may be unclear to the recipient what the focus should be on.
Example:
git/git@57e2c6e#diff-879955364ebbb27199a9a6548c762d7677a4ec50d832515267124da8a01cb74aR27
Expected:
Scroll to the line 27:
Ideally the scroll position should allow a few lines of context before and after this highlighted line/block.
![image](https://user-images.githubusercontent.com/1186084/207902287-1af73221-3f13-434f-b273-8dded51f74ef.png)
Actual:
![image](https://user-images.githubusercontent.com/1186084/207902372-bf7d5877-207a-447d-9118-aa704b2a6b30.png)
The highlighted line is slightly out of the viewport:
Beta Was this translation helpful? Give feedback.
All reactions