Skip to content

Commit b16724f

Browse files
committed
Improve docs of BufferLine.translateToString
1 parent 5630239 commit b16724f

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/common/buffer/BufferLine.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,17 @@ export class BufferLine implements IBufferLine {
509509
}
510510

511511
/**
512-
* If outColumns is specified, it will be filled with column numbers such that
513-
* returnedString[i] is display at outColumns[i] column.
514-
* outColumns[returnedString.length] is where the character following
515-
* returnedString will be displayed.
512+
* Translates the buffer line to a string.
516513
*
517-
* When a single cell is translated to multiple UTF-16 code units (e.g.
518-
* surrogate pair) in the returned string, the corresponding entries in
519-
* outColumns will have the same column number.
514+
* @param trimRight Whether to trim any empty cells on the right.
515+
* @param startCol The column to start the string (0-based inclusive).
516+
* @param endCol The column to end the string (0-based exclusive).
517+
* @param outColumns if specified, this array will be filled with column numbers such that
518+
* `returnedString[i]` is displayed at `outColumns[i]` column. `outColumns[returnedString.length]`
519+
* is where the character following `returnedString` will be displayed.
520+
*
521+
* When a single cell is translated to multiple UTF-16 code units (e.g. surrogate pair) in the
522+
* returned string, the corresponding entries in `outColumns` will have the same column number.
520523
*/
521524
public translateToString(trimRight?: boolean, startCol?: number, endCol?: number, outColumns?: number[]): string {
522525
startCol = startCol ?? 0;

0 commit comments

Comments
 (0)