mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		@@ -1679,7 +1679,7 @@ server_client_check_redraw(struct client *c)
 | 
			
		||||
	struct session		*s = c->session;
 | 
			
		||||
	struct tty		*tty = &c->tty;
 | 
			
		||||
	struct window_pane	*wp;
 | 
			
		||||
	int			 needed, flags;
 | 
			
		||||
	int			 needed, flags, mode = tty->mode;
 | 
			
		||||
	struct timeval		 tv = { .tv_usec = 1000 };
 | 
			
		||||
	static struct event	 ev;
 | 
			
		||||
	size_t			 left;
 | 
			
		||||
@@ -1730,6 +1730,7 @@ server_client_check_redraw(struct client *c)
 | 
			
		||||
 | 
			
		||||
	flags = tty->flags & (TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR);
 | 
			
		||||
	tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE)) | TTY_NOCURSOR;
 | 
			
		||||
	tty_update_mode(tty, mode, NULL);
 | 
			
		||||
 | 
			
		||||
	if (~c->flags & CLIENT_REDRAWWINDOW) {
 | 
			
		||||
		/*
 | 
			
		||||
@@ -1750,8 +1751,9 @@ server_client_check_redraw(struct client *c)
 | 
			
		||||
		screen_redraw_screen(c);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	tty->flags = (tty->flags & ~(TTY_FREEZE|TTY_NOCURSOR)) | flags;
 | 
			
		||||
	tty_update_mode(tty, tty->mode, NULL);
 | 
			
		||||
	tty->flags = (tty->flags & ~TTY_NOCURSOR) | (flags & TTY_NOCURSOR);
 | 
			
		||||
	tty_update_mode(tty, mode, NULL);
 | 
			
		||||
	tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR)) | flags;
 | 
			
		||||
 | 
			
		||||
	c->flags &= ~(CLIENT_ALLREDRAWFLAGS|CLIENT_STATUSFORCE);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								tty.c
									
									
									
									
									
								
							@@ -1739,7 +1739,10 @@ tty_cmd_scrollup(struct tty *tty, const struct tty_ctx *ctx)
 | 
			
		||||
		for (i = 0; i < ctx->num; i++)
 | 
			
		||||
			tty_putc(tty, '\n');
 | 
			
		||||
	} else {
 | 
			
		||||
		tty_cursor(tty, 0, tty->cy);
 | 
			
		||||
		if (tty->cy == UINT_MAX)
 | 
			
		||||
			tty_cursor(tty, 0, 0);
 | 
			
		||||
		else
 | 
			
		||||
			tty_cursor(tty, 0, tty->cy);
 | 
			
		||||
		tty_putcode1(tty, TTYC_INDN, ctx->num);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -2063,8 +2066,12 @@ tty_region(struct tty *tty, u_int rupper, u_int rlower)
 | 
			
		||||
	 * flag so further output causes a line feed). As a workaround, do an
 | 
			
		||||
	 * explicit move to 0 first.
 | 
			
		||||
	 */
 | 
			
		||||
	if (tty->cx >= tty->sx)
 | 
			
		||||
		tty_cursor(tty, 0, tty->cy);
 | 
			
		||||
	if (tty->cx >= tty->sx) {
 | 
			
		||||
		if (tty->cy == UINT_MAX)
 | 
			
		||||
			tty_cursor(tty, 0, 0);
 | 
			
		||||
		else
 | 
			
		||||
			tty_cursor(tty, 0, tty->cy);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	tty_putcode2(tty, TTYC_CSR, tty->rupper, tty->rlower);
 | 
			
		||||
	tty->cx = tty->cy = UINT_MAX;
 | 
			
		||||
@@ -2144,6 +2151,9 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
 | 
			
		||||
	u_int		 thisx, thisy;
 | 
			
		||||
	int		 change;
 | 
			
		||||
 | 
			
		||||
	if (tty->flags & TTY_BLOCK)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	if (cx > tty->sx - 1)
 | 
			
		||||
		cx = tty->sx - 1;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user