mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master' into master
This commit is contained in:
		
							
								
								
									
										37
									
								
								format.c
									
									
									
									
									
								
							
							
						
						
									
										37
									
								
								format.c
									
									
									
									
									
								
							@@ -1756,6 +1756,23 @@ format_cb_pane_dead(struct format_tree *ft)
 | 
			
		||||
	return (NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Callback for pane_dead_signal. */
 | 
			
		||||
static void *
 | 
			
		||||
format_cb_pane_dead_signal(struct format_tree *ft)
 | 
			
		||||
{
 | 
			
		||||
	struct window_pane	*wp = ft->wp;
 | 
			
		||||
	const char		*name;
 | 
			
		||||
 | 
			
		||||
	if (wp != NULL) {
 | 
			
		||||
		if ((wp->flags & PANE_STATUSREADY) && WIFSIGNALED(wp->status)) {
 | 
			
		||||
			name = sig2name(WTERMSIG(wp->status));
 | 
			
		||||
			return (format_printf("%s", name));
 | 
			
		||||
		}
 | 
			
		||||
		return (NULL);
 | 
			
		||||
	}
 | 
			
		||||
	return (NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Callback for pane_dead_status. */
 | 
			
		||||
static void *
 | 
			
		||||
format_cb_pane_dead_status(struct format_tree *ft)
 | 
			
		||||
@@ -1770,6 +1787,20 @@ format_cb_pane_dead_status(struct format_tree *ft)
 | 
			
		||||
	return (NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Callback for pane_dead_time. */
 | 
			
		||||
static void *
 | 
			
		||||
format_cb_pane_dead_time(struct format_tree *ft)
 | 
			
		||||
{
 | 
			
		||||
	struct window_pane	*wp = ft->wp;
 | 
			
		||||
 | 
			
		||||
	if (wp != NULL) {
 | 
			
		||||
		if (wp->flags & PANE_STATUSDRAWN)
 | 
			
		||||
			return (&wp->dead_time);
 | 
			
		||||
		return (NULL);
 | 
			
		||||
	}
 | 
			
		||||
	return (NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Callback for pane_format. */
 | 
			
		||||
static void *
 | 
			
		||||
format_cb_pane_format(struct format_tree *ft)
 | 
			
		||||
@@ -2804,9 +2835,15 @@ static const struct format_table_entry format_table[] = {
 | 
			
		||||
	{ "pane_dead", FORMAT_TABLE_STRING,
 | 
			
		||||
	  format_cb_pane_dead
 | 
			
		||||
	},
 | 
			
		||||
	{ "pane_dead_signal", FORMAT_TABLE_STRING,
 | 
			
		||||
	  format_cb_pane_dead_signal
 | 
			
		||||
	},
 | 
			
		||||
	{ "pane_dead_status", FORMAT_TABLE_STRING,
 | 
			
		||||
	  format_cb_pane_dead_status
 | 
			
		||||
	},
 | 
			
		||||
	{ "pane_dead_time", FORMAT_TABLE_TIME,
 | 
			
		||||
	  format_cb_pane_dead_time
 | 
			
		||||
	},
 | 
			
		||||
	{ "pane_fg", FORMAT_TABLE_STRING,
 | 
			
		||||
	  format_cb_pane_fg
 | 
			
		||||
	},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user