mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Use format_draw for command prompt prefix to allow styles, GitHub issue
3054.
This commit is contained in:
		
							
								
								
									
										4
									
								
								status.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								status.c
									
									
									
									
									
								
							@@ -718,7 +718,7 @@ status_prompt_redraw(struct client *c)
 | 
				
			|||||||
	memcpy(&cursorgc, &gc, sizeof cursorgc);
 | 
						memcpy(&cursorgc, &gc, sizeof cursorgc);
 | 
				
			||||||
	cursorgc.attr ^= GRID_ATTR_REVERSE;
 | 
						cursorgc.attr ^= GRID_ATTR_REVERSE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	start = screen_write_strlen("%s", c->prompt_string);
 | 
						start = format_width(c->prompt_string);
 | 
				
			||||||
	if (start > c->tty.sx)
 | 
						if (start > c->tty.sx)
 | 
				
			||||||
		start = c->tty.sx;
 | 
							start = c->tty.sx;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -728,7 +728,7 @@ status_prompt_redraw(struct client *c)
 | 
				
			|||||||
	for (offset = 0; offset < c->tty.sx; offset++)
 | 
						for (offset = 0; offset < c->tty.sx; offset++)
 | 
				
			||||||
		screen_write_putc(&ctx, &gc, ' ');
 | 
							screen_write_putc(&ctx, &gc, ' ');
 | 
				
			||||||
	screen_write_cursormove(&ctx, 0, lines - 1, 0);
 | 
						screen_write_cursormove(&ctx, 0, lines - 1, 0);
 | 
				
			||||||
	screen_write_nputs(&ctx, start, &gc, "%s", c->prompt_string);
 | 
						format_draw(&ctx, &gc, start, c->prompt_string, NULL, 0);
 | 
				
			||||||
	screen_write_cursormove(&ctx, start, lines - 1, 0);
 | 
						screen_write_cursormove(&ctx, start, lines - 1, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	left = c->tty.sx - start;
 | 
						left = c->tty.sx - start;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user