mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Fix reverse attribute in status line, GitHub issue 1709.
This commit is contained in:
		
							
								
								
									
										17
									
								
								status.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								status.c
									
									
									
									
									
								
							@@ -320,7 +320,7 @@ status_redraw(struct client *c)
 | 
				
			|||||||
	struct session			*s = c->session;
 | 
						struct session			*s = c->session;
 | 
				
			||||||
	struct screen_write_ctx		 ctx;
 | 
						struct screen_write_ctx		 ctx;
 | 
				
			||||||
	struct grid_cell		 gc;
 | 
						struct grid_cell		 gc;
 | 
				
			||||||
	u_int				 lines, i, width = c->tty.sx;
 | 
						u_int				 lines, i, n, width = c->tty.sx;
 | 
				
			||||||
	int				 flags, force = 0, changed = 0;
 | 
						int				 flags, force = 0, changed = 0;
 | 
				
			||||||
	struct options_entry		*o;
 | 
						struct options_entry		*o;
 | 
				
			||||||
	union options_value		*ov;
 | 
						union options_value		*ov;
 | 
				
			||||||
@@ -364,15 +364,17 @@ status_redraw(struct client *c)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	/* Write the status lines. */
 | 
						/* Write the status lines. */
 | 
				
			||||||
	o = options_get(s->options, "status-format");
 | 
						o = options_get(s->options, "status-format");
 | 
				
			||||||
	if (o == NULL)
 | 
						if (o == NULL) {
 | 
				
			||||||
		screen_write_clearscreen(&ctx, gc.bg);
 | 
							for (n = 0; n < width * lines; n++)
 | 
				
			||||||
	else {
 | 
								screen_write_putc(&ctx, &gc, ' ');
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
		for (i = 0; i < lines; i++) {
 | 
							for (i = 0; i < lines; i++) {
 | 
				
			||||||
			screen_write_cursormove(&ctx, 0, i, 0);
 | 
								screen_write_cursormove(&ctx, 0, i, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			ov = options_array_get(o, i);
 | 
								ov = options_array_get(o, i);
 | 
				
			||||||
			if (ov == NULL) {
 | 
								if (ov == NULL) {
 | 
				
			||||||
				screen_write_clearline(&ctx, gc.bg);
 | 
									for (n = 0; n < width; n++)
 | 
				
			||||||
 | 
										screen_write_putc(&ctx, &gc, ' ');
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			sle = &sl->entries[i];
 | 
								sle = &sl->entries[i];
 | 
				
			||||||
@@ -386,7 +388,10 @@ status_redraw(struct client *c)
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
			changed = 1;
 | 
								changed = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			screen_write_clearline(&ctx, gc.bg);
 | 
								for (n = 0; n < width; n++)
 | 
				
			||||||
 | 
									screen_write_putc(&ctx, &gc, ' ');
 | 
				
			||||||
 | 
								screen_write_cursormove(&ctx, 0, i, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			status_free_ranges(&sle->ranges);
 | 
								status_free_ranges(&sle->ranges);
 | 
				
			||||||
			format_draw(&ctx, &gc, width, expanded, &sle->ranges);
 | 
								format_draw(&ctx, &gc, width, expanded, &sle->ranges);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user