Merge pull request #2512 from Tyriar/refine_range

Refine IViewportRange API to use 'cursor positions' for x value
This commit is contained in:
Daniel Imms
2019-10-25 04:48:51 -07:00
committed by GitHub
3 changed files with 20 additions and 15 deletions
+1 -1
View File
@@ -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 } });
}
},
() => {
+5 -5
View File
@@ -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;