mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Only set a mouse mode for mouse-select-pane if none already set by the
mode (any will do).
This commit is contained in:
		@@ -449,9 +449,14 @@ server_client_reset_state(struct client *c)
 | 
			
		||||
	else
 | 
			
		||||
		tty_cursor(&c->tty, wp->xoff + s->cx, wp->yoff + s->cy);
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	 * Any mode will do for mouse-select-pane, but set standard mode if
 | 
			
		||||
	 * none.
 | 
			
		||||
	 */
 | 
			
		||||
	mode = s->mode;
 | 
			
		||||
	if (TAILQ_NEXT(TAILQ_FIRST(&w->panes), entry) != NULL &&
 | 
			
		||||
	    options_get_number(oo, "mouse-select-pane"))
 | 
			
		||||
	    options_get_number(oo, "mouse-select-pane") &&
 | 
			
		||||
	    (mode & ALL_MOUSE_MODES) == 0)
 | 
			
		||||
		mode |= MODE_MOUSE_STANDARD;
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								tty.c
									
									
									
									
									
								
							@@ -401,19 +401,19 @@ tty_update_mode(struct tty *tty, int mode)
 | 
			
		||||
		if (mode & ALL_MOUSE_MODES) {
 | 
			
		||||
			if (mode & MODE_MOUSE_UTF8)
 | 
			
		||||
				tty_puts(tty, "\033[?1005h");
 | 
			
		||||
			if (mode & MODE_MOUSE_STANDARD)
 | 
			
		||||
				tty_puts(tty, "\033[?1000h");
 | 
			
		||||
			if (mode & MODE_MOUSE_ANY)
 | 
			
		||||
				tty_puts(tty, "\033[?1003h");
 | 
			
		||||
			else if (mode & MODE_MOUSE_BUTTON)
 | 
			
		||||
				tty_puts(tty, "\033[?1002h");
 | 
			
		||||
			else if (mode & MODE_MOUSE_ANY)
 | 
			
		||||
				tty_puts(tty, "\033[?1003h");
 | 
			
		||||
			else if (mode & MODE_MOUSE_STANDARD)
 | 
			
		||||
				tty_puts(tty, "\033[?1000h");
 | 
			
		||||
		} else {
 | 
			
		||||
			if (tty->mode & MODE_MOUSE_STANDARD)
 | 
			
		||||
				tty_puts(tty, "\033[?1000l");
 | 
			
		||||
			if (tty->mode & MODE_MOUSE_ANY)
 | 
			
		||||
				tty_puts(tty, "\033[?1003l");
 | 
			
		||||
			else if (tty->mode & MODE_MOUSE_BUTTON)
 | 
			
		||||
				tty_puts(tty, "\033[?1002l");
 | 
			
		||||
			else if (tty->mode & MODE_MOUSE_ANY)
 | 
			
		||||
				tty_puts(tty, "\033[?1003l");
 | 
			
		||||
			else if (tty->mode & MODE_MOUSE_STANDARD)
 | 
			
		||||
				tty_puts(tty, "\033[?1000l");
 | 
			
		||||
			if (tty->mode & MODE_MOUSE_UTF8)
 | 
			
		||||
				tty_puts(tty, "\033[?1005l");
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user