mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	If in the middle of a drag, don't use an invalid key, just use
KEYC_MOUSE as a placeholder. Reported by Artem Fokin.
This commit is contained in:
		@@ -474,9 +474,10 @@ have_event:
 | 
				
			|||||||
	case NOTYPE:
 | 
						case NOTYPE:
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	case DRAG:
 | 
						case DRAG:
 | 
				
			||||||
		if (c->tty.mouse_drag_update != NULL)
 | 
							if (c->tty.mouse_drag_update != NULL) {
 | 
				
			||||||
			c->tty.mouse_drag_update(c, m);
 | 
								c->tty.mouse_drag_update(c, m);
 | 
				
			||||||
		else {
 | 
								key = KEYC_MOUSE;
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
			switch (MOUSE_BUTTONS(b)) {
 | 
								switch (MOUSE_BUTTONS(b)) {
 | 
				
			||||||
			case 0:
 | 
								case 0:
 | 
				
			||||||
				if (where == PANE)
 | 
									if (where == PANE)
 | 
				
			||||||
@@ -738,6 +739,13 @@ server_client_handle_key(struct client *c, key_code key)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		m->valid = 1;
 | 
							m->valid = 1;
 | 
				
			||||||
		m->key = key;
 | 
							m->key = key;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/*
 | 
				
			||||||
 | 
							 * A mouse event that continues to be valid but that we do not
 | 
				
			||||||
 | 
							 * want to pass through.
 | 
				
			||||||
 | 
							 */
 | 
				
			||||||
 | 
							if (key == KEYC_MOUSE)
 | 
				
			||||||
 | 
								return;
 | 
				
			||||||
	} else
 | 
						} else
 | 
				
			||||||
		m->valid = 0;
 | 
							m->valid = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user