mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:07:38 +00:00 
			
		
		
		
	Looking up argv[0] is expensive, so just use p_comm for the window name which is good enough. Also increase name update time to 500 ms.
This commit is contained in:
		
							
								
								
									
										5
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								window.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: window.c,v 1.67 2009-02-12 17:31:23 nicm Exp $ */
 | 
			
		||||
/* $Id: window.c,v 1.68 2009-02-13 00:43:04 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -235,7 +235,6 @@ window_create(const char *name, const char *cmd, const char *cwd,
 | 
			
		||||
	}
 | 
			
		||||
	w->active = TAILQ_FIRST(&w->panes);
 | 
			
		||||
 | 
			
		||||
	w->name_pid = -1;
 | 
			
		||||
	if (name != NULL) {
 | 
			
		||||
		w->name = xstrdup(name);
 | 
			
		||||
		options_set_number(&w->options, "automatic-rename", 0);
 | 
			
		||||
@@ -627,7 +626,6 @@ window_pane_set_mode(struct window_pane *wp, const struct window_mode *mode)
 | 
			
		||||
 | 
			
		||||
	if (wp->mode != NULL || wp->mode == mode)
 | 
			
		||||
		return (1);
 | 
			
		||||
	wp->window->name_pid = -1;
 | 
			
		||||
 | 
			
		||||
	wp->mode = mode;
 | 
			
		||||
 | 
			
		||||
@@ -642,7 +640,6 @@ window_pane_reset_mode(struct window_pane *wp)
 | 
			
		||||
{
 | 
			
		||||
	if (wp->mode == NULL)
 | 
			
		||||
		return;
 | 
			
		||||
	wp->window->name_pid = -1;
 | 
			
		||||
 | 
			
		||||
	wp->mode->free(wp);
 | 
			
		||||
	wp->mode = NULL;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user