aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2019-06-20 13:40:22 +0000
committernicm <nicm>2019-06-20 13:40:22 +0000
commitfc1df91e034627f674ed905be6a1159da883545e (patch)
tree17b541d73730fd22c781badc5dec1258ef165f2b
parentc1573727f0ea1d8a2530edc1a7848d9aa1d6f590 (diff)
downloadrtmux-fc1df91e034627f674ed905be6a1159da883545e.tar.gz
rtmux-fc1df91e034627f674ed905be6a1159da883545e.tar.bz2
rtmux-fc1df91e034627f674ed905be6a1159da883545e.zip
allow-rename and alternate-screen can be pane options.
-rw-r--r--input.c2
-rw-r--r--options-table.c4
-rw-r--r--tmux.143
-rw-r--r--window.c4
4 files changed, 25 insertions, 28 deletions
diff --git a/input.c b/input.c
index 3e85e14f..7df2a7b0 100644
--- a/input.c
+++ b/input.c
@@ -2259,7 +2259,7 @@ input_exit_rename(struct input_ctx *ictx)
{
if (ictx->flags & INPUT_DISCARD)
return;
- if (!options_get_number(ictx->wp->window->options, "allow-rename"))
+ if (!options_get_number(ictx->wp->options, "allow-rename"))
return;
log_debug("%s: \"%s\"", __func__, ictx->input_buf);
diff --git a/options-table.c b/options-table.c
index b287d660..228cf3f0 100644
--- a/options-table.c
+++ b/options-table.c
@@ -563,13 +563,13 @@ const struct options_table_entry options_table[] = {
{ .name = "allow-rename",
.type = OPTIONS_TABLE_FLAG,
- .scope = OPTIONS_TABLE_WINDOW,
+ .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
.default_num = 0
},
{ .name = "alternate-screen",
.type = OPTIONS_TABLE_FLAG,
- .scope = OPTIONS_TABLE_WINDOW,
+ .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
.default_num = 1
},
diff --git a/tmux.1 b/tmux.1
index ec7fdc31..1315e29a 100644
--- a/tmux.1
+++ b/tmux.1
@@ -3410,29 +3410,6 @@ session; this option is good for full-screen programs which support
.Dv SIGWINCH
and poor for interactive programs such as shells.
.Pp
-.It Xo Ic allow-rename
-.Op Ic on | off
-.Xc
-Allow programs to change the window name using a terminal escape
-sequence (\eek...\ee\e\e).
-The default is off.
-.Pp
-.It Xo Ic alternate-screen
-.Op Ic on | off
-.Xc
-This option configures whether programs running inside
-.Nm
-may use the terminal alternate screen feature, which allows the
-.Em smcup
-and
-.Em rmcup
-.Xr terminfo 5
-capabilities.
-The alternate screen feature preserves the contents of the window when an
-interactive application starts and restores it on exit, so that any output
-visible before the application starts reappears unchanged after it exits.
-The default is on.
-.Pp
.It Xo Ic automatic-rename
.Op Ic on | off
.Xc
@@ -3673,6 +3650,26 @@ as Shift, Alt or Ctrl.
Available pane options are:
.Pp
.Bl -tag -width Ds -compact
+.It Xo Ic allow-rename
+.Op Ic on | off
+.Xc
+Allow programs in the pane to change the window name using a terminal escape
+sequence (\eek...\ee\e\e).
+.Pp
+.It Xo Ic alternate-screen
+.Op Ic on | off
+.Xc
+This option configures whether programs running inside the pane may use the
+terminal alternate screen feature, which allows the
+.Em smcup
+and
+.Em rmcup
+.Xr terminfo 5
+capabilities.
+The alternate screen feature preserves the contents of the window when an
+interactive application starts and restores it on exit, so that any output
+visible before the application starts reappears unchanged after it exits.
+.Pp
.It Xo Ic remain-on-exit
.Op Ic on | off
.Xc
diff --git a/window.c b/window.c
index 25784454..77ca2ce2 100644
--- a/window.c
+++ b/window.c
@@ -944,7 +944,7 @@ window_pane_alternate_on(struct window_pane *wp, struct grid_cell *gc,
if (wp->saved_grid != NULL)
return;
- if (!options_get_number(wp->window->options, "alternate-screen"))
+ if (!options_get_number(wp->options, "alternate-screen"))
return;
sx = screen_size_x(s);
sy = screen_size_y(s);
@@ -972,7 +972,7 @@ window_pane_alternate_off(struct window_pane *wp, struct grid_cell *gc,
struct screen *s = &wp->base;
u_int sx, sy;
- if (!options_get_number(wp->window->options, "alternate-screen"))
+ if (!options_get_number(wp->options, "alternate-screen"))
return;
/*