Skip to content

Commit

Permalink
Don't respect editor.fontSize: 0
Browse files Browse the repository at this point in the history
toFloat only falls back to the default when the value is NaN, so an
explicit check for 0 is required.

Fixes #11715
  • Loading branch information
Tyriar committed Sep 8, 2016
1 parent 85a2337 commit 07d663d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vs/editor/common/config/commonEditorConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed
let fontSize = toFloat(opts.fontSize, DefaultConfig.editor.fontSize);
fontSize = Math.max(0, fontSize);
fontSize = Math.min(100, fontSize);
if (fontSize === 0) {
fontSize = DefaultConfig.editor.fontSize;
}

let lineHeight = toInteger(opts.lineHeight, 0, 150);
if (lineHeight === 0) {
Expand Down

0 comments on commit 07d663d

Please sign in to comment.