Skip to content

Commit

Permalink
Merge pull request #66781 from g1tman/patch-1
Browse files Browse the repository at this point in the history
refactor terminalInstance.ts
  • Loading branch information
Tyriar authored Jan 21, 2019
2 parents b9b1f03 + f39fdf8 commit 0e90c2e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1181,16 +1181,15 @@ export class TerminalInstance implements ITerminalInstance {
let cols = this._cols;
let rows = this._rows;
if (this._dimensionsOverride && this._dimensionsOverride.cols && this._dimensionsOverride.rows) {
cols = Math.min(Math.max(this._dimensionsOverride.cols, 2), this._cols);
rows = Math.min(Math.max(this._dimensionsOverride.rows, 2), this._rows);
cols = Math.min(Math.max(this._dimensionsOverride.cols, 2), cols);
rows = Math.min(Math.max(this._dimensionsOverride.rows, 2), rows);
}

if (this._xterm) {
const font = this._configHelper.getFont(this._xterm);

// Only apply these settings when the terminal is visible so that
// the characters are measured correctly.
if (this._isVisible) {
const font = this._configHelper.getFont(this._xterm);
const config = this._configHelper.config;
this._safeSetOption('letterSpacing', font.letterSpacing);
this._safeSetOption('lineHeight', font.lineHeight);
Expand Down

0 comments on commit 0e90c2e

Please sign in to comment.