Skip to content

Commit

Permalink
Code clean up for ui/widgets/screen_console.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
nirui committed Jul 22, 2022
1 parent eb5ac10 commit 519336f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions ui/widgets/screen_console.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
import FontFaceObserver from "fontfaceobserver";
import { Terminal } from "xterm";
import { WebLinksAddon } from "xterm-addon-web-links";
import { WebglAddon } from "xterm-addon-webgl";
// import { WebglAddon } from "xterm-addon-webgl";
import { FitAddon } from "xterm-addon-fit";
import { isNumber } from "../commands/common.js";
import { consoleScreenKeys } from "./screen_console_keys.js";
Expand Down Expand Up @@ -144,13 +144,12 @@ class Term {
fontFamily: termTypeFace + ", " + termFallbackTypeFace,
fontSize: this.fontSize,
logLevel: process.env.NODE_ENV === "development" ? "info" : "off",
theme: {
background: this.control.activeColor(),
},
});
this.fit = new FitAddon();

this.term.options.theme = {
background: this.control.activeColor(),
};

this.term.onData((data) => {
if (this.closed) {
return;
Expand Down Expand Up @@ -365,7 +364,7 @@ class Term {
return;
}

this.term.setOption("fontFamily", value);
this.term.options.fontFamily = value;
this.refit();
}

Expand All @@ -379,7 +378,7 @@ class Term {
}

this.fontSize += 2;
this.term.setOption("fontSize", this.fontSize);
this.term.options.fontSize = this.fontSize;
this.refit();
}

Expand All @@ -393,7 +392,7 @@ class Term {
}

this.fontSize -= 2;
this.term.setOption("fontSize", this.fontSize);
this.term.options.fontSize = this.fontSize;
this.refit();
}

Expand Down

0 comments on commit 519336f

Please sign in to comment.