mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	allow-rename and alternate-screen can be pane options.
This commit is contained in:
		
							
								
								
									
										2
									
								
								input.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										43
									
								
								tmux.1
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								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;
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user