Skip to content

Terminal left in broken state after quitting #2009

@jhorton-netapp

Description

@jhorton-netapp

Describe the bug

Running any shortcuts like ctrl+c, ctrl+r, ctrl+l, etc. do not work after quitting, instead printing character sequences like 4;5u, 8;5u and 9;5u. The only way I have found to fix this is by running reset or printf '\e[=0u' after closing copilot.

Added this to my ~/.bashrc:

function copilot() {
    command copilot "$@";
    printf '\e[=0u'
}

Affected version

1.0.4

Steps to reproduce the behavior

Open copilot
/quit copilot
Use a shortcut ctrl+r

Expected behavior

Expected copilot to properly clean up the terminal state, and shortcut behavior to work (ctrl+r would change prompt to (reverse-i-search): for example)
Characters are printed to the screen instead (ctrl+r prints "4;5u") and the shortcut does not execute

Additional context

OS: Linux, Ubuntu 24.04 on WSL2
Terminal: Alacritty
Shell: bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions