Skip to content

Commit

Permalink
[monaco] Update font if fontInfo was changed only
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
  • Loading branch information
RomanNikitenko committed Jun 26, 2020
1 parent a3f599f commit e9a1640
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/console/src/browser/console-widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ export class ConsoleWidget extends BaseWidget implements StatefulWidget {
this.toDispose.push(input);
this.toDispose.push(input.getControl().onDidLayoutChange(() => this.resizeContent()));

// todo update font if fontInfo was changed only
// it's impossible at the moment, but will be fixed for next upgrade of monaco version
// see https://github.com/microsoft/vscode/commit/5084e8ca1935698c98c163e339ca664818786c6d
this.toDispose.push(input.getControl().onDidChangeConfiguration(() => this.updateFont()));
this.toDispose.push(input.getControl().onDidChangeConfiguration(event => {
if (event.hasChanged(monaco.editor.EditorOption.fontInfo)) {
this.updateFont();
}
}));

this.updateFont();
if (inputFocusContextKey) {
Expand Down

0 comments on commit e9a1640

Please sign in to comment.