Merge pull request #2512 from Tyriar/refine_range
Refine IViewportRange API to use 'cursor positions' for x value
This commit is contained in:
@@ -308,7 +308,7 @@ export class Linkifier implements ILinkifier {
|
||||
if (matcher.hoverTooltipCallback) {
|
||||
// Note that IViewportRange use 1-based coordinates to align with escape sequences such
|
||||
// as CUP which use 1,1 as the default for row/col
|
||||
matcher.hoverTooltipCallback(e, uri, { start: { row: y1 + 1, col: x1 + 1 }, end: { row: y2 + 1, col: x2 } });
|
||||
matcher.hoverTooltipCallback(e, uri, { start: { x: x1, y: y1 }, end: { x: x2, y: y2 } });
|
||||
}
|
||||
},
|
||||
() => {
|
||||
|
||||
Vendored
+5
-5
@@ -44,13 +44,13 @@ export interface IViewport extends IDisposable {
|
||||
}
|
||||
|
||||
export interface IViewportRange {
|
||||
start: IViewportCellPosition;
|
||||
end: IViewportCellPosition;
|
||||
start: IViewportRangePosition;
|
||||
end: IViewportRangePosition;
|
||||
}
|
||||
|
||||
export interface IViewportCellPosition {
|
||||
col: number;
|
||||
row: number;
|
||||
export interface IViewportRangePosition {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export type LinkMatcherHandler = (event: MouseEvent, uri: string) => void;
|
||||
|
||||
Reference in New Issue
Block a user