Ensure that lint gutter tooltip is displayed underneath the gutter marker #5

Closed
hubgit wants to merge 2 commits from lint-gutter-tooltip-position into main
hubgit commented 2022-02-25 14:03:57 +01:00 (Migrated from github.com)

The aim here is to ensure that a lint gutter tooltip is displayed directly underneath the gutter marker when line wrapping is enabled (where the marker is positioned in the vertical centre of the "visual line"), rather than underneath the first line.

diagnostic marker on a short line:

image

diagnostic marker on a long line:

image
The aim here is to ensure that a lint gutter tooltip is displayed directly underneath the gutter marker when line wrapping is enabled (where the marker is positioned in the vertical centre of the "visual line"), rather than underneath the first line. diagnostic marker on a short line: <img width="590" alt="image" src="https://user-images.githubusercontent.com/14294/155710230-f02f616c-2058-4a16-a47f-57d4ba4fb47f.png"> diagnostic marker on a long line: <img width="590" alt="image" src="https://user-images.githubusercontent.com/14294/155710278-c316b52f-de88-4c17-a81c-e37a0d9c02d9.png">
hubgit commented 2022-02-25 14:04:07 +01:00 (Migrated from github.com)

For some reason the tooltip still isn't being positioned correctly when there's no room for it beneath the marker at the bottom of the page, but I suspect that's an issue in the tooltip extension rather than the positioning in the lint extension.

For some reason the tooltip still isn't being positioned correctly when there's no room for it beneath the marker at the bottom of the page, but I suspect that's an issue in the tooltip extension rather than the positioning in the lint extension.
marijnh commented 2022-02-25 15:46:50 +01:00 (Migrated from github.com)

This is getting terribly hacky. Do attached patches look reasonable to you as an alternative?

This is getting terribly hacky. Do attached patches look reasonable to you as an alternative?
hubgit commented 2022-02-25 16:48:15 +01:00 (Migrated from github.com)

The combination of those two patches seems to work perfectly - thanks! I'll close this PR.

The combination of those two patches seems to work perfectly - thanks! I'll close this PR.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/lint!5
No description provided.