From b16724f06a13d85ebb47c0b6f5e2a1786ef7107a Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri, 3 Nov 2023 08:53:53 -0700 Subject: [PATCH] Improve docs of BufferLine.translateToString --- src/common/buffer/BufferLine.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/common/buffer/BufferLine.ts b/src/common/buffer/BufferLine.ts index 9a583277..ee3481a2 100644 --- a/src/common/buffer/BufferLine.ts +++ b/src/common/buffer/BufferLine.ts @@ -509,14 +509,17 @@ export class BufferLine implements IBufferLine { } /** - * If outColumns is specified, it will be filled with column numbers such that - * returnedString[i] is display at outColumns[i] column. - * outColumns[returnedString.length] is where the character following - * returnedString will be displayed. + * Translates the buffer line to a string. * - * When a single cell is translated to multiple UTF-16 code units (e.g. - * surrogate pair) in the returned string, the corresponding entries in - * outColumns will have the same column number. + * @param trimRight Whether to trim any empty cells on the right. + * @param startCol The column to start the string (0-based inclusive). + * @param endCol The column to end the string (0-based exclusive). + * @param outColumns if specified, this array will be filled with column numbers such that + * `returnedString[i]` is displayed at `outColumns[i]` column. `outColumns[returnedString.length]` + * is where the character following `returnedString` will be displayed. + * + * When a single cell is translated to multiple UTF-16 code units (e.g. surrogate pair) in the + * returned string, the corresponding entries in `outColumns` will have the same column number. */ public translateToString(trimRight?: boolean, startCol?: number, endCol?: number, outColumns?: number[]): string { startCol = startCol ?? 0;