Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors not picked up by escape codes when colors are set from event #5478

Open
chtenb opened this issue May 27, 2024 · 1 comment
Open

Colors not picked up by escape codes when colors are set from event #5478

chtenb opened this issue May 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@chtenb
Copy link
Sponsor

chtenb commented May 27, 2024

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

wezterm 20240325-093507-e5ac32f2

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

When I set my colors through the window-config-reloaded (to dynamically set it to light or dark), they are not picked up when I use ansi escape codes when setting the status bar.

To Reproduce

No response

Configuration

local wezterm = require 'wezterm';

wezterm.on('window-config-reloaded', function(window, pane)
  local overrides = window:get_config_overrides() or {}
  overrides.colors = {
    indexed = {
      [232] = 'red',
    }
  }
end)

wezterm.on("update-status", function(window, pane)
  local bg = '232'
  window:set_right_status(wezterm.format({{ Text = '\x1b[48:5:' .. bg .. ':0m' }, { Text = 'Hello'}}))
end)


Config = {}
Config.use_fancy_tab_bar = false
Config.tab_bar_at_bottom = true
-- When this is uncommented, it works
-- Config.colors = {
--   indexed = {
--     [232] = 'red',
--   }
-- }
return Config

Expected Behavior

image

Instead, this happened:

image

Logs

No log events written

Anything else?

I will try to install the nightly version of wezterm later today to see if it is still a problem there

@chtenb chtenb added the bug Something isn't working label May 27, 2024
@chtenb
Copy link
Sponsor Author

chtenb commented May 30, 2024

As promised, I installed the latest nightly build, and this issue is still present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant