470
return -1;
471
}
473
>
let ghostTextIndex = -1;
474
>
let proceedWithGhostTextCheck = false;
475
>
let x = buffer.cursorX;
476
>
while (x > 0) {
477
>
const cell = line.getCell(--x);
478
>
if (!cell) {
479
break;
480
}
482
>
proceedWithGhostTextCheck = !this._isCellStyledLikeGhostText(cell);
483
>
break;
484
>
}
485
>
}
486
>
487
>
// Check to the end of the line for possible ghost text. For example pwsh's ghost text
488
>
// can look like this `Get-|Ch[ildItem]`
489
>
if (proceedWithGhostTextCheck) {
490
let potentialGhostIndexOffset = 0;
491
let x = buffer.cursorX;