mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Adjust to use 1-based, note in API
This commit is contained in:
@@ -306,7 +306,9 @@ export class Linkifier implements ILinkifier {
|
||||
e => {
|
||||
this._onLinkTooltip.fire(this._createLinkHoverEvent(x1, y1, x2, y2, fg));
|
||||
if (matcher.hoverTooltipCallback) {
|
||||
matcher.hoverTooltipCallback(e, uri, { start: { row: y1, col: x1 }, end: { row: y2, col: x2 } });
|
||||
// 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 } });
|
||||
}
|
||||
},
|
||||
() => {
|
||||
|
||||
Vendored
+2
-2
@@ -862,12 +862,12 @@ declare module 'xterm' {
|
||||
*/
|
||||
interface IViewportCellPosition {
|
||||
/**
|
||||
* The column of the cell.
|
||||
* The column of the cell. Note that this is 1-based; the first column is column 1.
|
||||
*/
|
||||
col: number;
|
||||
|
||||
/**
|
||||
* The row of the cell.
|
||||
* The row of the cell. Note that this is 1-based; the first row is row 1.
|
||||
*/
|
||||
row: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user