mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Command prompt key presses need to avoid the command queue, GitHub issue
1817. Also a tmux.1 fix from jmc.
This commit is contained in:
		@@ -1026,16 +1026,6 @@ server_client_key_callback(struct cmdq_item *item, void *data)
 | 
				
			|||||||
		fatal("gettimeofday failed");
 | 
							fatal("gettimeofday failed");
 | 
				
			||||||
	session_update_activity(s, &c->activity_time);
 | 
						session_update_activity(s, &c->activity_time);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Handle status line. */
 | 
					 | 
				
			||||||
	if (~c->flags & CLIENT_READONLY)
 | 
					 | 
				
			||||||
		status_message_clear(c);
 | 
					 | 
				
			||||||
	if (c->prompt_string != NULL) {
 | 
					 | 
				
			||||||
		if (c->flags & CLIENT_READONLY)
 | 
					 | 
				
			||||||
			goto out;
 | 
					 | 
				
			||||||
		if (status_prompt_key(c, key) == 0)
 | 
					 | 
				
			||||||
			goto out;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Check for mouse keys. */
 | 
						/* Check for mouse keys. */
 | 
				
			||||||
	m->valid = 0;
 | 
						m->valid = 0;
 | 
				
			||||||
	if (key == KEYC_MOUSE) {
 | 
						if (key == KEYC_MOUSE) {
 | 
				
			||||||
@@ -1216,16 +1206,24 @@ server_client_handle_key(struct client *c, struct key_event *event)
 | 
				
			|||||||
		return (0);
 | 
							return (0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Key presses in overlay mode are a special case. The queue might be
 | 
						 * Key presses in overlay mode and the command prompt are a special
 | 
				
			||||||
	 * blocked so they need to be processed immediately rather than queued.
 | 
						 * case. The queue might be blocked so they need to be processed
 | 
				
			||||||
 | 
						 * immediately rather than queued.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	if ((~c->flags & CLIENT_READONLY) && c->overlay_key != NULL) {
 | 
						if (~c->flags & CLIENT_READONLY) {
 | 
				
			||||||
		switch (c->overlay_key(c, event)) {
 | 
							status_message_clear(c);
 | 
				
			||||||
		case 0:
 | 
							if (c->prompt_string != NULL) {
 | 
				
			||||||
			return (0);
 | 
								if (status_prompt_key(c, event->key) == 0)
 | 
				
			||||||
		case 1:
 | 
									return (0);
 | 
				
			||||||
			server_client_clear_overlay(c);
 | 
							}
 | 
				
			||||||
			return (0);
 | 
							if (c->overlay_key != NULL) {
 | 
				
			||||||
 | 
								switch (c->overlay_key(c, event)) {
 | 
				
			||||||
 | 
								case 0:
 | 
				
			||||||
 | 
									return (0);
 | 
				
			||||||
 | 
								case 1:
 | 
				
			||||||
 | 
									server_client_clear_overlay(c);
 | 
				
			||||||
 | 
									return (0);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								tmux.1
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tmux.1
									
									
									
									
									
								
							@@ -4337,8 +4337,7 @@ to unset.
 | 
				
			|||||||
.Ic align=right
 | 
					.Ic align=right
 | 
				
			||||||
.Xc
 | 
					.Xc
 | 
				
			||||||
Align text to the left, centre or right of the available space if appropriate.
 | 
					Align text to the left, centre or right of the available space if appropriate.
 | 
				
			||||||
.It Xo Ic fill=colour
 | 
					.It Ic fill=colour
 | 
				
			||||||
.Xc
 | 
					 | 
				
			||||||
Fill the available space with a background colour if appropriate.
 | 
					Fill the available space with a background colour if appropriate.
 | 
				
			||||||
.It Xo Ic list=on ,
 | 
					.It Xo Ic list=on ,
 | 
				
			||||||
.Ic list=focus ,
 | 
					.Ic list=focus ,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user