Skip to content

v2: window title should be cleared (or reset) on shutdown #1474

@lrstanley

Description

@lrstanley

Describe the bug

If the app panics and needs recovering, or even in normal exiting state, the window title stays as it was set by bubbletea after bubbletea exits, leaving the terminal in a different state than before the app was started.

Setup
Please complete the following information along with version numbers, if applicable.

  • OS: ubuntu (wsl2)
  • Shell: bash
  • Terminal Emulator: Windows Terminal
  • Terminal Multiplexer: n/a

Expected behavior

I am not 100% sure what is available through OSC, but one of these would be ideal:

  1. "restore" the title (looks like it may be available in OSC, if I'm reading right?)
  2. Query the current title, before the app can explicitly set a title, store that, then re-set it post-tea.Quit and similar recovery scenarios.
  3. Worst-case scenario, set title to "", which at least in some terminals will revert the title back to its original state (does with Windows Terminal).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions