Skip to content

It's possible for terminal link hovers to be put in unhoverable locations #184740

Closed

Description

@Tyriar
echo "                                  C:/Github/microsoft/vscode/src/vs/workbench/contrib/terminal/test/common/terminalEnvironment.test.ts(243,41)"

image

Activity

  1. added
    bug
    workbench-hover
    on Jun 9, 2023
  2. added this to the Backlog milestone on Jun 9, 2023
  3. Tyriar commented on Jun 9, 2023

    @Tyriar
    ContributorAuthor

    The editor handles this well:

    image
    image

  4. added
    help wanted
    on Dec 8, 2023
  5. Tyriar commented on Dec 8, 2023

    @Tyriar
    ContributorAuthor

    Code pointer:

    const targetBounds = this._target.targetElements.map(e => getZoomAccountedBoundingClientRect(e));
    const top = Math.min(...targetBounds.map(e => e.top));
    const right = Math.max(...targetBounds.map(e => e.right));
    const bottom = Math.max(...targetBounds.map(e => e.bottom));
    const left = Math.min(...targetBounds.map(e => e.left));
    const width = right - left;
    const height = bottom - top;
    const targetRect: TargetRect = {
    top, right, bottom, left, width, height,
    center: {
    x: left + (width / 2),
    y: top + (height / 2)
    }
    };
    // These calls adjust the position depending on spacing.
    this.adjustHorizontalHoverPosition(targetRect);
    this.adjustVerticalHoverPosition(targetRect);
    // This call limits the maximum height of the hover.
    this.adjustHoverMaxHeight(targetRect);

  6. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Feb 23, 2024
  7. locked and limited conversation to collaborators on Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bughelp wantedinsiders-releasedterminal-linksverifiedworkbench-hover

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions