File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -712,17 +712,30 @@ declare module 'xterm' {
712712 readonly modes : IModes ;
713713
714714 /**
715- * Gets or sets the terminal options. This supports setting multiple options.
715+ * Gets or sets the terminal options. This supports setting multiple
716+ * options.
716717 *
717718 * @example Get a single option
718719 * ```ts
719720 * console.log(terminal.options.fontSize);
720721 * ```
721722 *
722- * @example Set a single option
723+ * @example Set a single option:
723724 * ```ts
724725 * terminal.options.fontSize = 12;
725726 * ```
727+ * Note that for options that are object, a new object must be used in order
728+ * to take effect as a reference comparison will be done:
729+ * ```ts
730+ * const newValue = terminal.options.theme;
731+ * newValue.background = '#000000';
732+ *
733+ * // This won't work
734+ * terminal.options.theme = newValue;
735+ *
736+ * // This will work
737+ * terminal.options.theme = { ...newValue };
738+ * ```
726739 *
727740 * @example Set multiple options
728741 * ```ts
You can’t perform that action at this time.
0 commit comments