Doesn't occupy 100% screen width #22633

Closed
opened 2026-01-31 08:19:06 +00:00 by claunia · 5 comments
Owner

Originally created by @IAmTahazzot on GitHub (Dec 7, 2024).

Windows Terminal version

1.21.3231.0

Windows build number

10.0.26100.0

Other Software

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Oct 03 2024 09:11:19)

Image

Steps to reproduce

  • Opening vim editor width some theme to see clearly, it doesn't occupy the whole screen of the terminal.
  • Or even simple text or pure powershell doesn't writing something till it touch the edge of the terminal screen to the right doesn't takes the whole screen.

Expected Behavior

It should take whole screen.

Actual Behavior

VIM or even just writing simple echo or text doesn't takes the whole terminal width even with padding 0

Originally created by @IAmTahazzot on GitHub (Dec 7, 2024). ### Windows Terminal version 1.21.3231.0 ### Windows build number 10.0.26100.0 ### Other Software VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Oct 03 2024 09:11:19) ![Image](https://github.com/user-attachments/assets/611d270b-dc51-48e4-b561-06451f2b148b) ### Steps to reproduce - Opening vim editor width some theme to see clearly, it doesn't occupy the whole screen of the terminal. - Or even simple text or pure powershell doesn't writing something till it touch the edge of the terminal screen to the right doesn't takes the whole screen. ### Expected Behavior It should take whole screen. ### Actual Behavior VIM or even just writing simple echo or text doesn't takes the whole terminal width even with padding 0
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 08:19:06 +00:00
Author
Owner

@Uttam1225 commented on GitHub (Dec 7, 2024):

Possible Causes:

Vim Configuration: Vim might have its own settings for screen width that aren't synced with your terminal's width.

Windows Terminal Settings: There might be a mismatch between the configured terminal size and the actual screen area.

Terminal Rendering: Sometimes, Windows Terminal might not properly resize or refresh, leading to an improper layout.

Font or DPI Settings: The font size or screen DPI might cause the terminal's rendering to seem off, leading to a mismatch in text alignment.

Optimal Solution:

Adjust Windows Terminal Settings:
Open Windows Terminal settings (Ctrl + ,).
In the settings, look for the "Initial Rows" and "Initial Columns" options. Adjust the "Initial Columns" value to a larger number (e.g., 120 or more), and see if this fixes the issue. This ensures that the terminal starts with enough width.

Check Vim Settings:
In Vim, ensure that the screen size is properly detected. Sometimes Vim has its own setting for width and height.
In Vim, try running the command :set columns=120 to make sure it uses a larger screen width.

Reset Terminal's Layout:
Close and reopen Windows Terminal to see if it refreshes the layout and fills the screen correctly.

Font and DPI Adjustments:
Sometimes, the font size or scaling settings on your display can cause this. Try reducing the font size or adjusting the DPI scaling in the terminal's settings to see if that resolves the issue.

Update Software:
Ensure that both Windows Terminal and Vim are updated to the latest versions. Sometimes bugs in earlier versions cause display issues.

@Uttam1225 commented on GitHub (Dec 7, 2024): **Possible Causes:** **Vim Configuration**: Vim might have its own settings for screen width that aren't synced with your terminal's width. **Windows Terminal Settings**: There might be a mismatch between the configured terminal size and the actual screen area. **Terminal Rendering**: Sometimes, Windows Terminal might not properly resize or refresh, leading to an improper layout. **Font or DPI Settings**: The font size or screen DPI might cause the terminal's rendering to seem off, leading to a mismatch in text alignment. **Optimal Solution:** **Adjust Windows Terminal Settings:** Open Windows Terminal settings (Ctrl + ,). In the settings, look for the "Initial Rows" and "Initial Columns" options. Adjust the "Initial Columns" value to a larger number (e.g., 120 or more), and see if this fixes the issue. This ensures that the terminal starts with enough width. **Check Vim Settings:** In Vim, ensure that the screen size is properly detected. Sometimes Vim has its own setting for width and height. In Vim, try running the command :set columns=120 to make sure it uses a larger screen width. **Reset Terminal's Layout:** Close and reopen Windows Terminal to see if it refreshes the layout and fills the screen correctly. **Font and DPI Adjustments:** Sometimes, the font size or scaling settings on your display can cause this. Try reducing the font size or adjusting the DPI scaling in the terminal's settings to see if that resolves the issue. **Update Software:** Ensure that both Windows Terminal and Vim are updated to the latest versions. Sometimes bugs in earlier versions cause display issues.
Author
Owner

@j4james commented on GitHub (Dec 7, 2024):

@IAmTahazzot I think what you're seeing there is just the scrollbar region. Have you tried setting Scrollbar visibility to Hidden? You'll find that option in Appearance subsection of your profile configuration. If you want it to apply to all profiles, you can set it in the Profile Defaults.

@j4james commented on GitHub (Dec 7, 2024): @IAmTahazzot I think what you're seeing there is just the scrollbar region. Have you tried setting **Scrollbar visibility** to **Hidden**? You'll find that option in **Appearance** subsection of your profile configuration. If you want it to apply to all profiles, you can set it in the **Profile Defaults**.
Author
Owner

@IAmTahazzot commented on GitHub (Dec 8, 2024):

@j4james The configuration works as expected when the terminal is not maximized. However, upon using Alt+Enter to toggle fullscreen or manually resizing the terminal to full screen, a slight gap remains on the right side, even after setting the following parameters:

padding: 0
scrollbarState: 'hidden'

This issue is not specific to Vim or Git Bash; it also occurs in the default Command Prompt (CMD) and PowerShell environments. The gap persists even with the scrollbar hidden, though it is less pronounced compared to when the scrollbar is visible.

Image

@IAmTahazzot commented on GitHub (Dec 8, 2024): @j4james The configuration works as expected when the terminal is not maximized. However, upon using `Alt+Enter` to toggle fullscreen or manually resizing the terminal to full screen, a slight gap remains on the right side, even after setting the following parameters: ```yaml padding: 0 scrollbarState: 'hidden' ``` This issue is not specific to Vim or Git Bash; it also occurs in the default Command Prompt (CMD) and PowerShell environments. The gap persists even with the scrollbar hidden, though it is less pronounced compared to when the scrollbar is visible. ![Image](https://github.com/user-attachments/assets/0ef4149d-f496-44a5-9e44-836b4569613b)
Author
Owner

@j4james commented on GitHub (Dec 8, 2024):

However, upon using Alt+Enter to toggle fullscreen or manually resizing the terminal to full screen, a slight gap remains on the right side,

@IAmTahazzot This is unavoidable if your font size isn't a multiple of the screen size. In the screenshot you've provided, the screen width is 1365 pixels, while the font width is 8 pixels. But 1365 isn't exactly divisible by 8, so you end up with 170 columns covering 1360 pixels (170*8), and that leaves you with a 5 pixel gap.

To get an exact fit on a device of that width, you'd need a font that has a width of 7 pixels or 13 pixels.

@j4james commented on GitHub (Dec 8, 2024): > However, upon using `Alt+Enter` to toggle fullscreen or manually resizing the terminal to full screen, a slight gap remains on the right side, @IAmTahazzot This is unavoidable if your font size isn't a multiple of the screen size. In the screenshot you've provided, the screen width is 1365 pixels, while the font width is 8 pixels. But 1365 isn't exactly divisible by 8, so you end up with 170 columns covering 1360 pixels (170*8), and that leaves you with a 5 pixel gap. To get an exact fit on a device of that width, you'd need a font that has a width of 7 pixels or 13 pixels.
Author
Owner

@IAmTahazzot commented on GitHub (Dec 8, 2024):

@j4james I truly appreciate the time and effort you took to explain everything so thoroughly. It all makes sense now. I’ve been using FiraCode Nerd Font set to 10px, but with some tweaks—like adjusting the font size and line height—it impacts the width and height as you explained. However, I’ve realized that Fira Code might not be the best fit for my screen, even when experimenting with decimal font sizes like 10.5 and beyond.

I do wish there were a feature like dynamic pixel scaling to ensure a perfect fit across different screen sizes or varying terminal window dimensions. I understand that’s quite challenging to implement, but it would be incredibly useful.

Thank you once again for your detailed and thoughtful explanation! 😊

@IAmTahazzot commented on GitHub (Dec 8, 2024): @j4james I truly appreciate the time and effort you took to explain everything so thoroughly. It all makes sense now. I’ve been using `FiraCode Nerd Font` set to `10px`, but with some tweaks—like adjusting the font size and line height—it impacts the width and height as you explained. However, I’ve realized that Fira Code might not be the best fit for my screen, even when experimenting with decimal font sizes like `10.5` and beyond. I do wish there were a feature like dynamic pixel scaling to ensure a perfect fit across different screen sizes or varying terminal window dimensions. I understand that’s quite challenging to implement, but it would be incredibly useful. **Thank you** once again for your detailed and thoughtful explanation! 😊
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22633