mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	The CLIENT_HOLD hack can go bye-bye.
This commit is contained in:
		
							
								
								
									
										4
									
								
								TODO
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								TODO
									
									
									
									
									
								
							@@ -29,7 +29,6 @@
 | 
			
		||||
- could use bsearch all over the place or get rid of smaller tables (clientmsg)
 | 
			
		||||
- better errors when creating new windows/sessions (how?)
 | 
			
		||||
- commands should have to care less about CMD_KEY
 | 
			
		||||
- CLIENT_HOLD sucks
 | 
			
		||||
- session with CMD_NOSESSION should be an error
 | 
			
		||||
- each command should have a print op as well for list keys
 | 
			
		||||
- Implicitly add exec to the commands for new windows (switch to disable it)
 | 
			
		||||
@@ -69,8 +68,7 @@
 | 
			
		||||
- bind non prefix keys
 | 
			
		||||
- stuff like rename would be nice to be able to do in-client like screen, if
 | 
			
		||||
  it could be implemented in a non-icky way
 | 
			
		||||
- there is to much redrawing. use flags? (there was a problem with this idea...
 | 
			
		||||
  CLIENT_HOLD?)
 | 
			
		||||
- there is to much redrawing. use flags?
 | 
			
		||||
- use modes for help etc
 | 
			
		||||
 | 
			
		||||
-- For 0.2 --------------------------------------------------------------------
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								server-fn.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								server-fn.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: server-fn.c,v 1.28 2007-11-21 19:53:56 nicm Exp $ */
 | 
			
		||||
/* $Id: server-fn.c,v 1.29 2007-11-21 20:04:37 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -113,12 +113,10 @@ server_write_window_cur(
 | 
			
		||||
 | 
			
		||||
	for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
 | 
			
		||||
		c = ARRAY_ITEM(&clients, i);
 | 
			
		||||
		if (c != NULL &&
 | 
			
		||||
		    c->session != NULL && c->session->curw->window == w) {
 | 
			
		||||
			if (c->flags & CLIENT_HOLD) /* XXX OUTPUT only */
 | 
			
		||||
				continue;
 | 
			
		||||
		if (c == NULL || c->session == NULL)
 | 
			
		||||
			continue;
 | 
			
		||||
		if (c->session->curw->window == w)
 | 
			
		||||
			server_write_client(c, type, buf, len);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -133,11 +131,8 @@ server_write_window_all(
 | 
			
		||||
		c = ARRAY_ITEM(&clients, i);
 | 
			
		||||
		if (c == NULL || c->session == NULL)
 | 
			
		||||
			continue;
 | 
			
		||||
		if (session_has(c->session, w)) {
 | 
			
		||||
			if (c->flags & CLIENT_HOLD) /* XXX OUTPUT only */
 | 
			
		||||
				continue;
 | 
			
		||||
		if (session_has(c->session, w))
 | 
			
		||||
			server_write_client(c, type, buf, len);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: server-msg.c,v 1.34 2007-11-21 13:11:41 nicm Exp $ */
 | 
			
		||||
/* $Id: server-msg.c,v 1.35 2007-11-21 20:04:37 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -243,11 +243,6 @@ server_msg_fn_keys(struct hdr *hdr, struct client *c)
 | 
			
		||||
	if (hdr->size & 0x1)
 | 
			
		||||
		fatalx("bad MSG_KEYS size");
 | 
			
		||||
 | 
			
		||||
	if (c->flags & CLIENT_HOLD) {
 | 
			
		||||
		server_redraw_client(c);
 | 
			
		||||
		c->flags &= ~CLIENT_HOLD;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	size = hdr->size;
 | 
			
		||||
	while (size != 0) {
 | 
			
		||||
		key = (int16_t) input_extract16(c->in);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tmux.h
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: tmux.h,v 1.90 2007-11-21 19:53:56 nicm Exp $ */
 | 
			
		||||
/* $Id: tmux.h,v 1.91 2007-11-21 20:04:37 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -514,7 +514,6 @@ struct client {
 | 
			
		||||
 | 
			
		||||
#define CLIENT_TERMINAL 0x1
 | 
			
		||||
#define CLIENT_PREFIX 0x2
 | 
			
		||||
#define CLIENT_HOLD 0x4
 | 
			
		||||
	int		 flags;
 | 
			
		||||
 | 
			
		||||
	struct session	*session;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user