tmux-plugins / tmux-sensible

basic tmux settings everyone can agree on
MIT License
1.73k stars 90 forks source link

Tmux running in vscode terminal: `setw -g aggressive-resize on` causes escape codes to appear #73

Open sinewalker opened 1 month ago

sinewalker commented 1 month ago

VSCode's built-in terminal emulator is based upon xterm-js, which does not understand the ANSI terminal reset commands. When starting with set-window-option -g aggressive-resize on, then the following in inserted at the start of the session, and also whenever the terminal is resized:

^[]10;rgb:bebe/c6c6/d0d0^[\^[]11;rgb:0f0f/1212/1515^[\

~/l/t/p/tmux-sensible► ]10;rgb:bebe/c6c6/d0d0\]11;rgb:0f0f/1212/1515\  

Removing the setting from sensible.tmux resolves this

Similar to #24

sinewalker commented 1 month ago

I have tried this hack in iterm_terminal but it still gets called. I'm probably overlooking something simple:

iterm_terminal() {
    [[ "${TERM_PROGRAM}" =~ ^iTerm || "${LC_TERMINAL}" =~ ^iTerm || "${TERM_PROGRAM}" =~ ^vscode ]]
}

If I could work that out, then I'd make a PR.

sinewalker commented 1 month ago

If I could work that out, then I'd make a PR.

To clarify, what I've tried so far (unsuccessfully) is