-
Notifications
You must be signed in to change notification settings - Fork 37.3k
fix(terminal): support decimal font sizes #286212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6f13873
f8533bf
0bd1392
7175a85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -186,6 +186,53 @@ suite('Workbench - TerminalConfigurationService', () => { | |||||
| strictEqual(terminalConfigurationService.getFont(getActiveWindow()).fontSize, EDITOR_FONT_DEFAULTS.fontSize, 'The default editor font size should be used when terminal.integrated.fontSize is not set'); | ||||||
| }); | ||||||
|
|
||||||
| test('fontSize 11.5 (decimal)', () => { | ||||||
| const terminalConfigurationService = createTerminalConfigationService({ | ||||||
| editor: { | ||||||
| fontFamily: 'foo', | ||||||
| fontSize: 9 | ||||||
| }, | ||||||
| terminal: { | ||||||
| integrated: { | ||||||
| fontFamily: 'bar', | ||||||
| fontSize: 11.5 | ||||||
| } | ||||||
| } | ||||||
| }); | ||||||
| strictEqual(terminalConfigurationService.getFont(getActiveWindow()).fontSize, 11.5, 'terminal.integrated.fontSize should preserve decimal values'); | ||||||
| }); | ||||||
|
|
||||||
| test('fontSize 13.25 (decimal)', () => { | ||||||
| const terminalConfigurationService = createTerminalConfigationService({ | ||||||
| editor: { | ||||||
| fontFamily: 'foo', | ||||||
| fontSize: 9 | ||||||
| }, | ||||||
| terminal: { | ||||||
| integrated: { | ||||||
| fontFamily: 'bar', | ||||||
| fontSize: 13.25 | ||||||
| } | ||||||
| } | ||||||
| }); | ||||||
| strictEqual(terminalConfigurationService.getFont(getActiveWindow()).fontSize, 13.25, 'terminal.integrated.fontSize should preserve decimal values like 13.25'); | ||||||
| }); | ||||||
|
|
||||||
| test('fontSize decimal (Linux Ubuntu)', () => { | ||||||
|
||||||
| test('fontSize decimal (Linux Ubuntu)', () => { | |
| test('fontSize 10.5 (Linux Ubuntu)', () => { |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three test cases test essentially the same behavior with slightly different decimal values. Consider consolidating the first two tests (11.5 and 13.25) into a single test that validates decimal preservation with one representative value, keeping only the Ubuntu-specific test separate as it tests the adjustment logic. This would reduce redundancy while maintaining adequate coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test names should be more consistent with the existing pattern in the test suite. Tests like 'fontSize 10' don't include clarifying suffixes. Consider removing '(decimal)' from the first two test names since the value itself clearly indicates it's a decimal, leaving just 'fontSize 11.5' and 'fontSize 13.25' to match the existing convention.