microsoft / microsoft/terminal

TerminalPaneContent.cpp - TerminalPaneContent::TerminalPaneContent never knows the profile settings updated with the wt.exe cmdline arguments

Open
#17,473 6 comments 0 reactions 0 assignees View on GitHub
Area-TerminalControl Help Wanted Issue-Bug Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

#16497 (which is in sync with main) - PR-Commit: 756d7b3e7860d1082ed87833521ed65638688abc

### Windows build number

10.0.19045.4529

### Other Software

_No response_

### Steps to reproduce

Try to access the profile configuration used by the current terminal pane content in a version that is updated based on the command line parameter used to start wt.exe .

### Expected Behavior

The `_profile` variable contains the current profile settings from settings file.
And the `_cache` contains the settings updated based on the wt.exe command line arguments.

### Actual Behavior

The `_profile` variable contains the current profile settings from settings file.
And the `_cache` contains the current profile settings from settings file too.

### Debug information
You can use my PR #16497 and check the value of `const auto closeMode` in `TerminalPaneContent::_controlConnectionStateChangedHandler`. It is always the one from settings and the same as the one from `_profile`.

If you compare the value against the value returned in `AppCommandlineArgs::_getNewTerminalArgs` you will see that the command line parsing works.

Contributor guide

Open the contributing guide

Research direction

Start with TerminalPaneContent.cpp, especially TerminalPaneContent::_controlConnectionStateChangedHandler, and compare its values with AppCommandlineArgs::_getNewTerminalArgs as described. Review PR #16497 and verify that the profile and cache reflect command-line-updated settings; use the closeMode value as the reported check.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.