mirror of
				git://git.suckless.org/st
				synced 2025-11-04 04:57:33 +00:00 
			
		
		
		
	dont print color warning on color reset OSC 104 without parameter
also print explicitly "(null)" when printf "%s" p=NULL. noticed when exiting mutt: printf '\x1b]104\x07'
This commit is contained in:
		
							parent
							
								
									9acec468fb
								
							
						
					
					
						commit
						b650256044
					
				
							
								
								
									
										5
									
								
								st.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								st.c
									
									
									
									
									
								
							@ -1865,7 +1865,10 @@ strhandle(void)
 | 
				
			|||||||
		case 104: /* color reset, here p = NULL */
 | 
							case 104: /* color reset, here p = NULL */
 | 
				
			||||||
			j = (narg > 1) ? atoi(strescseq.args[1]) : -1;
 | 
								j = (narg > 1) ? atoi(strescseq.args[1]) : -1;
 | 
				
			||||||
			if (xsetcolorname(j, p)) {
 | 
								if (xsetcolorname(j, p)) {
 | 
				
			||||||
				fprintf(stderr, "erresc: invalid color %s\n", p);
 | 
									if (par == 104 && narg <= 1)
 | 
				
			||||||
 | 
										return; /* color reset without parameter */
 | 
				
			||||||
 | 
									fprintf(stderr, "erresc: invalid color j=%d, p=%s\n",
 | 
				
			||||||
 | 
									        j, p ? p : "(null)");
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				/*
 | 
									/*
 | 
				
			||||||
				 * TODO if defaultbg color is changed, borders
 | 
									 * TODO if defaultbg color is changed, borders
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user