Adress feedback
This commit is contained in:
+15
-8
@@ -367,6 +367,16 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
|||||||
value = 'block';
|
value = 'block';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'fontWeight':
|
||||||
|
if (!value) {
|
||||||
|
value = 'normal';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'fontWeightBold':
|
||||||
|
if (!value) {
|
||||||
|
value = 'bold';
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'lineHeight':
|
case 'lineHeight':
|
||||||
if (value < 1) {
|
if (value < 1) {
|
||||||
console.warn(`${key} cannot be less than 1, value: ${value}`);
|
console.warn(`${key} cannot be less than 1, value: ${value}`);
|
||||||
@@ -419,17 +429,14 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
|||||||
break;
|
break;
|
||||||
case 'letterSpacing':
|
case 'letterSpacing':
|
||||||
case 'lineHeight':
|
case 'lineHeight':
|
||||||
|
case 'fontWeight':
|
||||||
|
case 'fontWeightBold':
|
||||||
|
const didCharSizeChange = (key === 'fontWeight' || key === 'fontWeightBold');
|
||||||
|
|
||||||
// When the font changes the size of the cells may change which requires a renderer clear
|
// When the font changes the size of the cells may change which requires a renderer clear
|
||||||
this.renderer.clear();
|
this.renderer.clear();
|
||||||
this.renderer.onResize(this.cols, this.rows, false);
|
this.renderer.onResize(this.cols, this.rows, didCharSizeChange);
|
||||||
this.refresh(0, this.rows - 1);
|
this.refresh(0, this.rows - 1);
|
||||||
// this.charMeasure.measure(this.options);
|
|
||||||
case 'fontWeight':
|
|
||||||
case 'fontWeightBold':
|
|
||||||
// When the font weight changes the size of the cells may change which requires a renderer clear
|
|
||||||
this.renderer.clear();
|
|
||||||
this.renderer.onResize(this.cols, this.rows, true);
|
|
||||||
this.refresh(0, this.rows - 1);
|
|
||||||
case 'scrollback':
|
case 'scrollback':
|
||||||
this.buffers.resize(this.cols, this.rows);
|
this.buffers.resize(this.cols, this.rows);
|
||||||
this.viewport.syncScrollArea();
|
this.viewport.syncScrollArea();
|
||||||
|
|||||||
Vendored
+1
-1
@@ -404,7 +404,7 @@ declare module 'xterm' {
|
|||||||
* Retrieves an option's value from the terminal.
|
* Retrieves an option's value from the terminal.
|
||||||
* @param key The option key.
|
* @param key The option key.
|
||||||
*/
|
*/
|
||||||
getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'termName'): string;
|
getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold'| 'termName'): string;
|
||||||
/**
|
/**
|
||||||
* Retrieves an option's value from the terminal.
|
* Retrieves an option's value from the terminal.
|
||||||
* @param key The option key.
|
* @param key The option key.
|
||||||
|
|||||||
Reference in New Issue
Block a user