@@ -1166,18 +1166,7 @@ declare module '@xterm/xterm' {
11661166 deregisterCharacterJoiner ( joinerId : number ) : void ;
11671167
11681168 /**
1169- * Adds a marker to the normal buffer and returns it.
1170- * NOTE: If you are synchronously writing data line-by-line (as in, doing
1171- * multiple `term.writeln()`before the terminal re-rendering), the cursorY
1172- * position will not be updated until after all pending terminal writes,
1173- * which will result in the markers offset being calculated from the
1174- * position cursorY was when your batch of writes started.
1175- * Dealing with this issue by setting `cursorYOffset` to be index of this
1176- * line in your batch will fail if you have any line wraps prior to it.
1177- * Instead, consider registering a marker inside a write callback, eg.:
1178- * ```ts
1179- * term.writeln(data, () => term.registerMarker(...))
1180- * ```
1169+ * Adds a marker to the normal buffer and returns it.
11811170 * @param cursorYOffset The y position offset of the marker from the cursor.
11821171 * @returns The new marker or undefined.
11831172 */
@@ -1280,7 +1269,8 @@ declare module '@xterm/xterm' {
12801269 * bytes given as Uint8Array from the pty or a string. Raw bytes will always
12811270 * be treated as UTF-8 encoded, string data as UTF-16.
12821271 * @param callback Optional callback that fires when the data was processed
1283- * by the parser.
1272+ * by the parser. This callback must be provided and awaited in order for
1273+ * {@link buffer} to reflect the change in the write.
12841274 */
12851275 write ( data : string | Uint8Array , callback ?: ( ) => void ) : void ;
12861276
@@ -1290,7 +1280,8 @@ declare module '@xterm/xterm' {
12901280 * bytes given as Uint8Array from the pty or a string. Raw bytes will always
12911281 * be treated as UTF-8 encoded, string data as UTF-16.
12921282 * @param callback Optional callback that fires when the data was processed
1293- * by the parser.
1283+ * by the parser. This callback must be provided and awaited in order for
1284+ * {@link buffer} to reflect the change in the write.
12941285 */
12951286 writeln ( data : string | Uint8Array , callback ?: ( ) => void ) : void ;
12961287
0 commit comments