Skip to content

Make sure a blank title string resets the title#17802

Merged
lhecker merged 1 commit intomicrosoft:mainfrom
j4james:fix-title-reset
Aug 26, 2024
Merged

Make sure a blank title string resets the title#17802
lhecker merged 1 commit intomicrosoft:mainfrom
j4james:fix-title-reset

Conversation

@j4james
Copy link
Collaborator

@j4james j4james commented Aug 26, 2024

Summary of the Pull Request

When a VT title sequence sets the title to a blank string, that is meant
to trigger a reset to the default starting value. This used to work in
the past because the blank value was dealt with by conhost, so Windows
Terminal never received a blank title, but that's no longer the case
with the new VT passthrough. This PR fixes the issue by getting Windows
Terminal to handle the blank title strings itself.

References and Relevant Issues

VT passthrough was introduced in PR #17510.

Validation Steps Performed

I've manually verified that the OSC 0, OSC 2, and DECSWT sequences
now correctly reset the title when passed a blank title string.

PR Checklist

@microsoft-github-policy-service microsoft-github-policy-service bot added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Aug 26, 2024
@j4james j4james marked this pull request as ready for review August 26, 2024 10:26
@lhecker lhecker merged commit 1f71568 into microsoft:main Aug 26, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Area-VT Virtual Terminal sequence support Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Aug 26, 2024
Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'm marking this up for servicing to 1.22.

DHowett pushed a commit that referenced this pull request Sep 4, 2024
## Summary of the Pull Request

When a VT title sequence sets the title to a blank string, that is meant
to trigger a reset to the default starting value. This used to work in
the past because the blank value was dealt with by conhost, so Windows
Terminal never received a blank title, but that's no longer the case
with the new VT passthrough. This PR fixes the issue by getting Windows
Terminal to handle the blank title strings itself.

## References and Relevant Issues

VT passthrough was introduced in PR #17510.

## Validation Steps Performed

I've manually verified that the `OSC 0`, `OSC 2`, and `DECSWT` sequences
now correctly reset the title when passed a blank title string.

## PR Checklist
- [x] Closes #17800

(cherry picked from commit 1f71568)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgSNvr0 PVTI_lADOAF3p4s4AmhmQzgSOFrc
Service-Version: 1.22
@j4james j4james deleted the fix-title-reset branch December 15, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.

Projects

Development

Successfully merging this pull request may close these issues.

Reset title sequences have stopped working in Windows Termial

4 participants