Skip to content

xterm-addon-web-links IViewportRange in hover callback is offset by 1 #4247

@Coding-Kiwi

Description

@Coding-Kiwi

I have a line with a link:

image

Its the first line (row) of the terminal.

When I select something in the line and call terminal.getSelectionPosition, the start and end row is 0, this is what I would expect
When I hover the link and receive the location from the WebLinkProvider hover callback the start and end row is 1

Details

  • Browser and browser version: Electron 21.2.0
  • OS version: Windows 11
  • xterm.js version: 5.0.0
  • xterm-addon-web-links 0.7.0

Steps to reproduce

  1. have a line with text and link
  2. have xterm-addon-web-links with hover callback
  3. select text, call getSelectionPosition
  4. hover link, receive location
  5. compare rows of locations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions