[PR #14329] [MERGED] Prevent conhost scrollbar overlapping content #30049

Open
opened 2026-01-31 09:38:21 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14329
Author: @j4james
Created: 11/3/2022
Status: Merged
Merged: 11/10/2022
Merged by: @undefined

Base: mainHead: fix-scrollbar-overlap


📝 Commits (1)

  • deb5807 Make sure scrollbar doesn't cover content when scroll-forward disabled.

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/host/screenInfo.cpp (+1 -1)

📄 Description

Prior to this PR, the conhost vertical scrollbar would be forced to be
visible whenever the "Disable Scroll-Forward" option was set. It was
assumed that it would be needed as soon as the current viewport was
filled, so it was better to start off visible and disabled.

When the viewport height and buffer height are the same, though, the
scrollbar is never needed, and conhost compensates for that by making
the window narrower. But since we were still forcing the scrollbar to be
visible, that would result in it overlapping content in the rightmost
columns.

This PR attempts to fix that issue by simply leaving the scrollbar to
decide the visibility itself. This is perhaps not as aesthetically
pleasing when it starts off hidden and then later becomes visible, but
that seems better than having it overlap the content.

I've manually confirmed this fixes the problem reported in issue #2449.

Closes #2449


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/14329 **Author:** [@j4james](https://github.com/j4james) **Created:** 11/3/2022 **Status:** ✅ Merged **Merged:** 11/10/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `fix-scrollbar-overlap` --- ### 📝 Commits (1) - [`deb5807`](https://github.com/microsoft/terminal/commit/deb5807fdd30b09007446274412655fdf88e0887) Make sure scrollbar doesn't cover content when scroll-forward disabled. ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/host/screenInfo.cpp` (+1 -1) </details> ### 📄 Description Prior to this PR, the conhost vertical scrollbar would be forced to be visible whenever the "Disable Scroll-Forward" option was set. It was assumed that it would be needed as soon as the current viewport was filled, so it was better to start off visible and disabled. When the viewport height and buffer height are the same, though, the scrollbar is never needed, and conhost compensates for that by making the window narrower. But since we were still forcing the scrollbar to be visible, that would result in it overlapping content in the rightmost columns. This PR attempts to fix that issue by simply leaving the scrollbar to decide the visibility itself. This is perhaps not as aesthetically pleasing when it starts off hidden and then later becomes visible, but that seems better than having it overlap the content. I've manually confirmed this fixes the problem reported in issue #2449. Closes #2449 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:38:21 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30049