Skip to content

Actively detect links under the cursor when lines change #4323

@Tyriar

Description

@Tyriar

The PR #4298 made it so that an active link under the cursor would be re-evaluated instead of thrown away when the line changes, but we also want to capture this case:

Recording 2022-12-09 at 09 19 23

Repro:

  1. Fill viewport
  2. Run echo -n "http://example.com/" && sleep 1 && echo -n "a" && sleep 1 && echo -n "b" && sleep 1 && echo -n "c" && sleep 1 && echo -n " x" && sleep 1 && echo -n "x" && sleep 1 && echo "x" && sleep 1 && echo "y" && sleep 1 && echo "y" && sleep 1 && echo "y"
  3. Put cursor above http://example.com/, when a line is added such that the cursor is over the link, the link should get an underline and clicking should activate it, without needing to move the cursor beforehand

This change makes this happen but will result in a lot of work:

    this._renderService.onRenderedViewportChange(e => {
      if (this._lastMouseEvent) {
        this._handleMouseMove(this._lastMouseEvent);
      }
    });

Can augment the above, the solution in #4298, some debouncing and possible some other form of caching to save some CPU cycles?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions