Skip to content

OSC11 query caches response until client is changed  #3582

@Baspar

Description

@Baspar

Issue description

Following commit a41a927, the OSC 11 sequence correctly returns the background color, but doesn't reflect any change in background color until client is detached/attached

How to reproduce:

~/osc11.bash

#!/usr/bin/env bash
read -rs -d \\ -p $'\e]11;?\e\\' BG
echo "$BG" \
    | xxd -c 64 \
    | grep -o -E "rgb:.{4}/.{4}/.{4}"
  1. Clean existing tmux tmux kill-server
  2. Start a new session tmux new
  3. bash ~/osc11.bash => rgb:fbfb/f1f1/c8c8
  4. Update the background from the terminal (In my case, Change from OS light mode to dark mode)
  5. bash ~/osc11.bash => rgb:fbfb/f1f1/c8c8 Still shows the previous background color
  6. Detach session C-b d
  7. Re-attach tmux attach
  8. bash ~/osc11.bash => rgb:2020/2020/2020 Shows the new background color

Required information

  • tmux version: tmux next-3.4 @ 0eb5d25
  • Platform: Darwin arm
  • $TERM inside tmux: xterm-256color
  • $TERM outside tmux: xterm-256color
  • Terminal: Wezterm

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