Skip to content
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

Terminal suggest items look crammed #239095

Open
ulugbekna opened this issue Jan 29, 2025 · 16 comments · May be fixed by #239543
Open

Terminal suggest items look crammed #239095

ulugbekna opened this issue Jan 29, 2025 · 16 comments · May be fixed by #239543
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug terminal-suggest
Milestone

Comments

@ulugbekna
Copy link
Contributor

Image

Version: 1.97.0-insider
Commit: 3250a26
Date: 2025-01-29T05:04:50.952Z
Electron: 32.2.7
ElectronBuildId: 10660205
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.2.0

@meganrogge
Copy link
Contributor

What font size are you using? With that font size, how does it look in the editor?

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Jan 29, 2025
@ulugbekna
Copy link
Contributor Author

ulugbekna commented Jan 29, 2025

I have editor font family "Jetbrains Mono" and font size 16, but I'm suprised it would affect terminal suggest given terminal has its own font family and size (which I haven't changed)

  "editor.fontFamily": "JetBrains Mono, Menlo, Monaco, 'Courier New', monospace",
  "editor.fontLigatures": true,
  "editor.fontSize": 16,

My editor suggest:

Image

It seems terminal suggest isn't passed correct font info.

@meganrogge
Copy link
Contributor

We use editor's font family, size, etc. for this to be consistent with the editor's suggest widget. We do not use the terminal's values for these.

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug terminal-suggest and removed info-needed Issue requires more information from poster labels Jan 29, 2025
@meganrogge
Copy link
Contributor

I'll see what's going on for your particular setup. The one in the editor and terminal should look the same.

@meganrogge meganrogge added this to the February 2025 milestone Jan 29, 2025
@meganrogge meganrogge removed the bug Issue identified by VS Code Team member as probable bug label Jan 29, 2025
@meganrogge
Copy link
Contributor

With fontSize: 16, upon inspection, the editor and terminal suggest items have the same height and thus look the same amount of crammed.

Image Image

@meganrogge
Copy link
Contributor

When using a different font, I do see a difference though.

@meganrogge meganrogge added the bug Issue identified by VS Code Team member as probable bug label Jan 29, 2025
@meganrogge
Copy link
Contributor

My guess is the editor does something special here

const fontInfo = this.editor.getOption(EditorOption.fontInfo);

@meganrogge
Copy link
Contributor

protected _readFontInfo(bareFontInfo: BareFontInfo): FontInfo {
return FontMeasurements.readFontInfo(getWindowById(this._targetWindowId, true).window, bareFontInfo);
}

@meganrogge
Copy link
Contributor

maybe related to monospace fonts

this.useMonospaceOptimizations = (
fontInfo.isMonospace
&& !options.get(EditorOption.disableMonospaceOptimizations)
);

@ulugbekna
Copy link
Contributor Author

ulugbekna commented Jan 30, 2025

We use editor's font family, size, etc. for this to be consistent with the editor's suggest widget. We do not use the terminal's values for these.

it's very surprising that all text in terminal uses one font and suggestions would use another (if user has configured different font for terminal & editor, which was my case)

@Tyriar
Copy link
Member

Tyriar commented Jan 30, 2025

@ulugbekna wouldn't it also be surprising that 2 auto complete widgets would look different in the same application depending on context?

@ulugbekna
Copy link
Contributor Author

@Tyriar IMHO I wouldn't have noticed the two suggests being different, but I did notice difference between fonts in my terminal, especially because I use different font sizes

Image

@ulugbekna
Copy link
Contributor Author

ulugbekna commented Feb 3, 2025

@Tyriar @meganrogge Since I'm now seeing suggest in terminal quite often compared to never before, I was wondering if this's a new feature for this iteration. This issue seems quite bad, so maybe it should prevent terminal suggest being on by default? Or maybe @jrieken could help with figuring out how to adjust the line height so the suggest is displayed correctly.

@Tyriar
Copy link
Member

Tyriar commented Feb 3, 2025

@ulugbekna it's currently experimental and off by default, I'm guessing we'll promote to preview for Feb and eventually the hope is to enable it by default.

@Tyriar
Copy link
Member

Tyriar commented Feb 3, 2025

I can repro with fontSize 16:

Image

Looks like the editor changes the item/line height:

Image

It was my idea to use the editor font, maybe that was wrong, I'm not sure. I always try keep them in sync.

@Tyriar
Copy link
Member

Tyriar commented Feb 3, 2025

I think you've convinced me, @meganrogge let's just use the terminal text config here and fix up the line height. It makes sense considering that when you complete it should appear and look the same as it looked in the suggest widget.

meganrogge added a commit that referenced this issue Feb 3, 2025
@meganrogge meganrogge linked a pull request Feb 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug terminal-suggest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants