mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Implement "all event" (1003) mouse mode but in a way that works. The
main issue is that if we have two panes, A with 1002 and B with 1003, we need to set 1003 outside tmux in order to get all the mouse events, but then we need to suppress the ones that pane A doesn't want. This is easy in SGR mouse mode, because buttons == 3 is only used for movement events (for other events the trailing m/M marks a release instead), but in normal mouse mode we can't tell so easily. So for that, look at the previous event instead - if it is drag+release as well, then the current event is a movement event.
This commit is contained in:
		
							
								
								
									
										4
									
								
								format.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								format.c
									
									
									
									
									
								
							@@ -1280,11 +1280,13 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp)
 | 
			
		||||
	    !!(wp->base.mode & MODE_WRAP));
 | 
			
		||||
 | 
			
		||||
	format_add(ft, "mouse_any_flag", "%d",
 | 
			
		||||
	    !!(wp->base.mode & (MODE_MOUSE_STANDARD|MODE_MOUSE_BUTTON)));
 | 
			
		||||
	    !!(wp->base.mode & ALL_MOUSE_MODES));
 | 
			
		||||
	format_add(ft, "mouse_standard_flag", "%d",
 | 
			
		||||
	    !!(wp->base.mode & MODE_MOUSE_STANDARD));
 | 
			
		||||
	format_add(ft, "mouse_button_flag", "%d",
 | 
			
		||||
	    !!(wp->base.mode & MODE_MOUSE_BUTTON));
 | 
			
		||||
	format_add(ft, "mouse_all_flag", "%d",
 | 
			
		||||
	    !!(wp->base.mode & MODE_MOUSE_ALL));
 | 
			
		||||
 | 
			
		||||
	format_add_cb(ft, "pane_tabs", format_cb_pane_tabs);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user