mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		
							
								
								
									
										4
									
								
								format.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								format.c
									
									
									
									
									
								
							@@ -737,6 +737,8 @@ format_cb_mouse_word(struct format_tree *ft, struct format_entry *fe)
 | 
				
			|||||||
	wp = cmd_mouse_pane(&ft->m, NULL, NULL);
 | 
						wp = cmd_mouse_pane(&ft->m, NULL, NULL);
 | 
				
			||||||
	if (wp == NULL)
 | 
						if (wp == NULL)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
						if (!TAILQ_EMPTY (&wp->modes))
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
	if (cmd_mouse_at(wp, &ft->m, &x, &y, 0) != 0)
 | 
						if (cmd_mouse_at(wp, &ft->m, &x, &y, 0) != 0)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	gd = wp->base.grid;
 | 
						gd = wp->base.grid;
 | 
				
			||||||
@@ -813,6 +815,8 @@ format_cb_mouse_line(struct format_tree *ft, struct format_entry *fe)
 | 
				
			|||||||
	wp = cmd_mouse_pane(&ft->m, NULL, NULL);
 | 
						wp = cmd_mouse_pane(&ft->m, NULL, NULL);
 | 
				
			||||||
	if (wp == NULL)
 | 
						if (wp == NULL)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
						if (!TAILQ_EMPTY (&wp->modes))
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
	if (cmd_mouse_at(wp, &ft->m, &x, &y, 0) != 0)
 | 
						if (cmd_mouse_at(wp, &ft->m, &x, &y, 0) != 0)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	gd = wp->base.grid;
 | 
						gd = wp->base.grid;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -100,7 +100,6 @@ void
 | 
				
			|||||||
screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp,
 | 
					screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp,
 | 
				
			||||||
    struct screen *s)
 | 
					    struct screen *s)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	char	tmp[32];
 | 
					 | 
				
			||||||
	u_int	y;
 | 
						u_int	y;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	memset(ctx, 0, sizeof *ctx);
 | 
						memset(ctx, 0, sizeof *ctx);
 | 
				
			||||||
@@ -119,12 +118,17 @@ screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp,
 | 
				
			|||||||
	ctx->scrolled = 0;
 | 
						ctx->scrolled = 0;
 | 
				
			||||||
	ctx->bg = 8;
 | 
						ctx->bg = 8;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (wp != NULL) {
 | 
						if (log_get_level() != 0) {
 | 
				
			||||||
		snprintf(tmp, sizeof tmp, "pane %%%u (at %u,%u)", wp->id,
 | 
							if (wp != NULL) {
 | 
				
			||||||
		    wp->xoff, wp->yoff);
 | 
								log_debug("%s: size %ux%u, pane %%%u (at %u,%u)",
 | 
				
			||||||
 | 
								    __func__, screen_size_x(ctx->s),
 | 
				
			||||||
 | 
								    screen_size_y(ctx->s), wp->id, wp->xoff, wp->yoff);
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								log_debug("%s: size %ux%u, no pane",
 | 
				
			||||||
 | 
								    __func__, screen_size_x(ctx->s),
 | 
				
			||||||
 | 
								    screen_size_y(ctx->s));
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	log_debug("%s: size %ux%u, %s", __func__, screen_size_x(ctx->s),
 | 
					 | 
				
			||||||
	    screen_size_y(ctx->s), wp == NULL ? "no pane" : tmp);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Finish writing. */
 | 
					/* Finish writing. */
 | 
				
			||||||
@@ -1234,7 +1238,6 @@ screen_write_collect_scroll(struct screen_write_ctx *ctx)
 | 
				
			|||||||
	for (y = s->rupper; y < s->rlower; y++) {
 | 
						for (y = s->rupper; y < s->rlower; y++) {
 | 
				
			||||||
		cl = &ctx->list[y + 1];
 | 
							cl = &ctx->list[y + 1];
 | 
				
			||||||
		TAILQ_CONCAT(&ctx->list[y].items, &cl->items, entry);
 | 
							TAILQ_CONCAT(&ctx->list[y].items, &cl->items, entry);
 | 
				
			||||||
		TAILQ_INIT(&cl->items);
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user