mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Fix dragging when in view mode rather than copy mode, GitHub issue 1740
from Brad Town.
This commit is contained in:
		@@ -3477,7 +3477,9 @@ window_copy_move_mouse(struct mouse_event *m)
 | 
				
			|||||||
	if (wp == NULL)
 | 
						if (wp == NULL)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	wme = TAILQ_FIRST(&wp->modes);
 | 
						wme = TAILQ_FIRST(&wp->modes);
 | 
				
			||||||
	if (wme == NULL || wme->mode != &window_copy_mode)
 | 
						if (wme == NULL)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						if (wme->mode != &window_copy_mode && wme->mode != &window_view_mode)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (cmd_mouse_at(wp, m, &x, &y, 0) != 0)
 | 
						if (cmd_mouse_at(wp, m, &x, &y, 0) != 0)
 | 
				
			||||||
@@ -3500,7 +3502,9 @@ window_copy_start_drag(struct client *c, struct mouse_event *m)
 | 
				
			|||||||
	if (wp == NULL)
 | 
						if (wp == NULL)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	wme = TAILQ_FIRST(&wp->modes);
 | 
						wme = TAILQ_FIRST(&wp->modes);
 | 
				
			||||||
	if (wme == NULL || wme->mode != &window_copy_mode)
 | 
						if (wme == NULL)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						if (wme->mode != &window_copy_mode && wme->mode != &window_view_mode)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (cmd_mouse_at(wp, m, &x, &y, 1) != 0)
 | 
						if (cmd_mouse_at(wp, m, &x, &y, 1) != 0)
 | 
				
			||||||
@@ -3534,7 +3538,9 @@ window_copy_drag_update(struct client *c, struct mouse_event *m)
 | 
				
			|||||||
	if (wp == NULL)
 | 
						if (wp == NULL)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	wme = TAILQ_FIRST(&wp->modes);
 | 
						wme = TAILQ_FIRST(&wp->modes);
 | 
				
			||||||
	if (wme == NULL || wme->mode != &window_copy_mode)
 | 
						if (wme == NULL)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						if (wme->mode != &window_copy_mode && wme->mode != &window_view_mode)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	data = wme->data;
 | 
						data = wme->data;
 | 
				
			||||||
@@ -3573,7 +3579,9 @@ window_copy_drag_release(struct client *c, struct mouse_event *m)
 | 
				
			|||||||
	if (wp == NULL)
 | 
						if (wp == NULL)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	wme = TAILQ_FIRST(&wp->modes);
 | 
						wme = TAILQ_FIRST(&wp->modes);
 | 
				
			||||||
	if (wme == NULL || wme->mode != &window_copy_mode)
 | 
						if (wme == NULL)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						if (wme->mode != &window_copy_mode && wme->mode != &window_view_mode)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	data = wme->data;
 | 
						data = wme->data;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user