mirror of
https://github.com/Microsoft/vscode
synced 2024-09-28 15:32:07 +00:00
Merge pull request #230004 from microsoft/tyriar/229965
Get correct mouse cursor y regardless of MouseEvent.target
This commit is contained in:
commit
7308a15d5c
|
@ -80,7 +80,7 @@ class TerminalCommandGuideContribution extends Disposable implements ITerminalCo
|
|||
if (!rect) {
|
||||
return;
|
||||
}
|
||||
const mouseCursorY = Math.floor(e.offsetY / (rect.height / xterm.raw.rows));
|
||||
const mouseCursorY = Math.floor((e.clientY - rect.top) / (rect.height / xterm.raw.rows));
|
||||
const command = this._instance.capabilities.get(TerminalCapability.CommandDetection)?.getCommandForLine(xterm.raw.buffer.active.viewportY + mouseCursorY);
|
||||
if (command && 'getOutput' in command) {
|
||||
xterm.markTracker.showCommandGuide(command);
|
||||
|
|
Loading…
Reference in a new issue