Skip to content

v2: Scrollback lost on tea.QuitΒ #1571

@tj-smith47

Description

@tj-smith47

Describe the bug
I have a couple of Cobra CLI's that I've upgraded to v2 of all available Charmbracelet packages. On my Debian Bookworm VM over SSH via Termius, the TUI's exit just fine and I can still scroll my history with up/down arrows. On MacOS using WezTerm, exiting both TUI's breaks the terminal on exit, forcing me to run reset to regain that functionality.

NOTE: I tested with kitty and this issue is not present, so the issue appears to be specific to WezTerm.

Setup
Working:

  • OS: Debian 12 (Bookworm)
  • Shell: Bash
  • Terminal Emulator: Termius (SSH)
  • Terminal Multiplexer: N/A

Not Working:

  • OS: macOS
  • Shell: zsh
  • Terminal Emulator: WezTerm
  • Terminal Multiplexer: N/A

To Reproduce
Steps to reproduce the behavior:

  1. Open WezTerm and launch a TUI app running v2.
  2. Press the quit / exit keybinding.
  3. Scroll up or down - you should see random characters printing instead of previous commands.

Expected behavior
Scrollback maintained.

Metadata

Metadata

Assignees

No one assigned

    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