terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Split Panes inherit tab color and title of active pane

Open Techypanda opened this issue 6 months ago • 2 comments

Summary of the Pull Request

Previously to this PR if you split a pane as suggested in #18930, the split pane will lose its custom title and will not have its custom color, with this PR it will keep as indicated.

References and Relevant Issues

  • https://github.com/microsoft/terminal/issues/18930

Detailed Description of the Pull Request / Additional comments

This PR makes it so that when you perform a split on a pane, it will copy the title and color of the source tab to make it stay.

Validation Steps Performed

  1. .\WindowsTerminal.exe -p "Windows PowerShell" --tabColor "#FF0000" --title "Hello World"
  2. Split pane
  3. Kept name and color
  4. Added new tab
  5. Added new tab
  6. Renamed third tab
  7. Changed color of third tab
  8. Split second tab (remains as normal (PowerShell title)
  9. Split third tab (Kept custom name and custom title)
  10. First tab still kept original name title, second is isolated to itself and third has its custom color and title.

PR Checklist

  • [x] Closes #18930
  • [ ] Tests added/passed (I can add unit tests need a bit of a pointer as to where i need to add for this change, currently only locally tested)
  • [ ] Documentation updated (Not needed i don't think?)
    • If checked, please file a pull request on our docs repo and link it here: #xxx
  • [ ] Schema updated (if necessary) (Not needed)

Techypanda avatar May 29 '25 03:05 Techypanda

I thought split pane on the UI and split pane via CLI would use the exact same path but the fact that when i run the command you suggested (also in original issue) it doesnt retain title tells me this is not the case...

I will see how to fix this thanks

Techypanda avatar Jun 04 '25 05:06 Techypanda

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (1)

ebefore

These words are not needed and should be removed abcd ABCDEFGHIJ abcdefghijk ABCDEFGHIJKLMNOPQRS ABCDEFGHIJKLMNOPQRST ABCDEFGHIJKLMNOPQRSTUVWXY allocs appium Argb asan autocrlf backported bytebuffer cac CLE codenav codepath commandline COMMITID componentization constness dealloc deserializers DISPATCHNOTIFY DTest entrypoints EVENTID FINDUP foob fuzzer fuzzyfinder hlocal hstring IInput Interner keyscan lstrcmpi Munged numlock offboarded oob pids positionals Productize pseudoterminal remoting renamer roadmap ruleset SELECTALL somefile Stringable tearoff TODOs touchpad TREX Unregistering USERDATA vectorize viewports wsl

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the [email protected]:Techypanda/terminal.git repository on the split-panes-inherit-tab-color-and-title branch (:information_source: how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.24/apply.pl' |
perl - 'https://github.com/microsoft/terminal/actions/runs/15435220146/attempts/1'

Errors (1)

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

:x: Errors Count
:x: ignored-expect-variant 3

See :x: Event descriptions for more information.

:pencil2: Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

:microscope: You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. :wink:

If the flagged items are :exploding_head: false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it, try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

github-actions[bot] avatar Jun 04 '25 06:06 github-actions[bot]

Coming back to this, I notice that it's been marked draft - what's the current state? @carlos-zamora, I think there was a question for you (but honestly not sure)

DHowett avatar Oct 16 '25 00:10 DHowett

Coming back to this, I notice that it's been marked draft - what's the current state? @carlos-zamora, I think there was a question for you (but honestly not sure)

This can most likely be closed as I don't think the "solution" I came up with is scalable, happy to close if you agree @DHowett / anyone

Techypanda avatar Oct 16 '25 00:10 Techypanda

Ah, that's too bad! Sorry about that.

I'll close it for now, but we'd always be happy to see you return 🙂

DHowett avatar Oct 16 '25 00:10 DHowett