mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Do not update mode until actually drawing something.
This commit is contained in:
		@@ -438,6 +438,7 @@ screen_redraw_screen(struct client *c)
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	screen_redraw_set_context(c, &ctx);
 | 
						screen_redraw_set_context(c, &ctx);
 | 
				
			||||||
 | 
						tty_update_mode(&c->tty, c->tty.mode, NULL);
 | 
				
			||||||
	tty_sync_start(&c->tty);
 | 
						tty_sync_start(&c->tty);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (flags & (CLIENT_REDRAWWINDOW|CLIENT_REDRAWBORDERS)) {
 | 
						if (flags & (CLIENT_REDRAWWINDOW|CLIENT_REDRAWBORDERS)) {
 | 
				
			||||||
@@ -473,6 +474,7 @@ screen_redraw_pane(struct client *c, struct window_pane *wp)
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	screen_redraw_set_context(c, &ctx);
 | 
						screen_redraw_set_context(c, &ctx);
 | 
				
			||||||
 | 
						tty_update_mode(&c->tty, c->tty.mode, NULL);
 | 
				
			||||||
	tty_sync_start(&c->tty);
 | 
						tty_sync_start(&c->tty);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	screen_redraw_draw_pane(&ctx, wp);
 | 
						screen_redraw_draw_pane(&ctx, wp);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1780,7 +1780,6 @@ server_client_check_redraw(struct client *c)
 | 
				
			|||||||
			if (!redraw)
 | 
								if (!redraw)
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			log_debug("%s: redrawing pane %%%u", __func__, wp->id);
 | 
								log_debug("%s: redrawing pane %%%u", __func__, wp->id);
 | 
				
			||||||
			tty_update_mode(tty, mode, NULL);
 | 
					 | 
				
			||||||
			screen_redraw_pane(c, wp);
 | 
								screen_redraw_pane(c, wp);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		c->redraw_panes = 0;
 | 
							c->redraw_panes = 0;
 | 
				
			||||||
@@ -1788,7 +1787,6 @@ server_client_check_redraw(struct client *c)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (c->flags & CLIENT_ALLREDRAWFLAGS) {
 | 
						if (c->flags & CLIENT_ALLREDRAWFLAGS) {
 | 
				
			||||||
		tty_update_mode(tty, mode, NULL);
 | 
					 | 
				
			||||||
		if (options_get_number(s->options, "set-titles"))
 | 
							if (options_get_number(s->options, "set-titles"))
 | 
				
			||||||
			server_client_set_title(c);
 | 
								server_client_set_title(c);
 | 
				
			||||||
		screen_redraw_screen(c);
 | 
							screen_redraw_screen(c);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tty.c
									
									
									
									
									
								
							@@ -676,7 +676,8 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s)
 | 
				
			|||||||
		mode &= ~MODE_CURSOR;
 | 
							mode &= ~MODE_CURSOR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	changed = mode ^ tty->mode;
 | 
						changed = mode ^ tty->mode;
 | 
				
			||||||
	log_debug("%s: update mode %x to %x", c->name, tty->mode, mode);
 | 
						if (changed != 0)
 | 
				
			||||||
 | 
							log_debug("%s: update mode %x to %x", c->name, tty->mode, mode);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (changed & MODE_BLINKING) {
 | 
						if (changed & MODE_BLINKING) {
 | 
				
			||||||
		if (tty_term_has(tty->term, TTYC_CVVIS))
 | 
							if (tty_term_has(tty->term, TTYC_CVVIS))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user