mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:33:27 +00:00
Add a per-pane option set. Pane options inherit from window options (so
there should be no change to existing behaviour) and are set and shown with set-option -p and show-options -p. Change remain-on-exit and window-style/window-active-style to be pane options (some others will be changed later). This makes select-pane -P and -g unnecessary so no longer document them (they still work) and no longer document set-window-option and show-window-options in favour of set-option -w and show-options -w.
This commit is contained in:
16
input.c
16
input.c
@ -2347,12 +2347,14 @@ input_osc_10(struct input_ctx *ictx, const char *p)
|
||||
{
|
||||
struct window_pane *wp = ictx->wp;
|
||||
u_int r, g, b;
|
||||
char tmp[16];
|
||||
|
||||
if (sscanf(p, "rgb:%2x/%2x/%2x", &r, &g, &b) != 3)
|
||||
goto bad;
|
||||
|
||||
wp->style.gc.fg = colour_join_rgb(r, g, b);
|
||||
wp->flags |= PANE_REDRAW;
|
||||
xsnprintf(tmp, sizeof tmp, "fg=#%02x%02x%02x", r, g, b);
|
||||
options_set_style(wp->options, "window-style", 1, tmp);
|
||||
options_set_style(wp->options, "window-active-style", 1, tmp);
|
||||
wp->flags |= (PANE_REDRAW|PANE_STYLECHANGED);
|
||||
|
||||
return;
|
||||
|
||||
@ -2366,12 +2368,14 @@ input_osc_11(struct input_ctx *ictx, const char *p)
|
||||
{
|
||||
struct window_pane *wp = ictx->wp;
|
||||
u_int r, g, b;
|
||||
char tmp[16];
|
||||
|
||||
if (sscanf(p, "rgb:%2x/%2x/%2x", &r, &g, &b) != 3)
|
||||
goto bad;
|
||||
|
||||
wp->style.gc.bg = colour_join_rgb(r, g, b);
|
||||
wp->flags |= PANE_REDRAW;
|
||||
xsnprintf(tmp, sizeof tmp, "bg=#%02x%02x%02x", r, g, b);
|
||||
options_set_style(wp->options, "window-style", 1, tmp);
|
||||
options_set_style(wp->options, "window-active-style", 1, tmp);
|
||||
wp->flags |= (PANE_REDRAW|PANE_STYLECHANGED);
|
||||
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user