mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Add a -A option to pause a pane manually.
This commit is contained in:
		@@ -68,6 +68,8 @@ cmd_refresh_client_update_offset(struct client *tc, const char *value)
 | 
				
			|||||||
		control_set_pane_off(tc, wp);
 | 
							control_set_pane_off(tc, wp);
 | 
				
			||||||
	else if (strcmp(colon, "continue") == 0)
 | 
						else if (strcmp(colon, "continue") == 0)
 | 
				
			||||||
		control_continue_pane(tc, wp);
 | 
							control_continue_pane(tc, wp);
 | 
				
			||||||
 | 
						else if (strcmp(colon, "pause") == 0)
 | 
				
			||||||
 | 
							control_pause_pane(tc, wp);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
out:
 | 
					out:
 | 
				
			||||||
	free(copy);
 | 
						free(copy);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								control.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								control.c
									
									
									
									
									
								
							@@ -265,6 +265,20 @@ control_continue_pane(struct client *c, struct window_pane *wp)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Pause a pane. */
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					control_pause_pane(struct client *c, struct window_pane *wp)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct control_pane	*cp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						cp = control_add_pane(c, wp);
 | 
				
			||||||
 | 
						if (~cp->flags & CONTROL_PANE_PAUSED) {
 | 
				
			||||||
 | 
							cp->flags |= CONTROL_PANE_PAUSED;
 | 
				
			||||||
 | 
							control_discard_pane(c, cp);
 | 
				
			||||||
 | 
							control_write(c, "%%pause %%%u", wp->id);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Write a line. */
 | 
					/* Write a line. */
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
control_vwrite(struct client *c, const char *fmt, va_list ap)
 | 
					control_vwrite(struct client *c, const char *fmt, va_list ap)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										11
									
								
								tmux.1
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								tmux.1
									
									
									
									
									
								
							@@ -1304,9 +1304,10 @@ The argument is a pane ID (with leading
 | 
				
			|||||||
.Ql % ) ,
 | 
					.Ql % ) ,
 | 
				
			||||||
a colon, then one of
 | 
					a colon, then one of
 | 
				
			||||||
.Ql on ,
 | 
					.Ql on ,
 | 
				
			||||||
.Ql off
 | 
					.Ql off ,
 | 
				
			||||||
 | 
					.Ql continue
 | 
				
			||||||
or
 | 
					or
 | 
				
			||||||
.Ql continue .
 | 
					.Ql pause .
 | 
				
			||||||
If
 | 
					If
 | 
				
			||||||
.Ql off ,
 | 
					.Ql off ,
 | 
				
			||||||
.Nm
 | 
					.Nm
 | 
				
			||||||
@@ -1315,9 +1316,13 @@ the pane off, will stop reading from the pane.
 | 
				
			|||||||
If
 | 
					If
 | 
				
			||||||
.Ql continue ,
 | 
					.Ql continue ,
 | 
				
			||||||
.Nm
 | 
					.Nm
 | 
				
			||||||
will return to sending output to a paused pane (see the
 | 
					will return to sending output to the pane if it was paused (manually or with the
 | 
				
			||||||
.Ar pause-after
 | 
					.Ar pause-after
 | 
				
			||||||
flag).
 | 
					flag).
 | 
				
			||||||
 | 
					If
 | 
				
			||||||
 | 
					.Ql pause ,
 | 
				
			||||||
 | 
					.Nm
 | 
				
			||||||
 | 
					will pause the pane.
 | 
				
			||||||
.Fl A
 | 
					.Fl A
 | 
				
			||||||
may be given multiple times for different panes.
 | 
					may be given multiple times for different panes.
 | 
				
			||||||
.Pp
 | 
					.Pp
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								tmux.h
									
									
									
									
									
								
							@@ -2846,6 +2846,7 @@ void	control_stop(struct client *);
 | 
				
			|||||||
void	control_set_pane_on(struct client *, struct window_pane *);
 | 
					void	control_set_pane_on(struct client *, struct window_pane *);
 | 
				
			||||||
void	control_set_pane_off(struct client *, struct window_pane *);
 | 
					void	control_set_pane_off(struct client *, struct window_pane *);
 | 
				
			||||||
void	control_continue_pane(struct client *, struct window_pane *);
 | 
					void	control_continue_pane(struct client *, struct window_pane *);
 | 
				
			||||||
 | 
					void	control_pause_pane(struct client *, struct window_pane *);
 | 
				
			||||||
struct window_pane_offset *control_pane_offset(struct client *,
 | 
					struct window_pane_offset *control_pane_offset(struct client *,
 | 
				
			||||||
	   struct window_pane *, int *);
 | 
						   struct window_pane *, int *);
 | 
				
			||||||
void	control_reset_offsets(struct client *);
 | 
					void	control_reset_offsets(struct client *);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user