mirror of
				https://github.com/nicbarker/clay.git
				synced 2025-11-04 08:36:17 +00:00 
			
		
		
		
	Fixing rendering of lines that contain a single character
This commit is contained in:
		
							parent
							
								
									208c7cb3a0
								
							
						
					
					
						commit
						ae24802dad
					
				
							
								
								
									
										2
									
								
								clay.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								clay.h
									
									
									
									
									
								
							| 
						 | 
					@ -1704,7 +1704,7 @@ Clay__MeasureTextCacheItem *Clay__MeasureTextCached(Clay_String *text, Clay_Text
 | 
				
			||||||
                previousWord = Clay__AddMeasuredWord(CLAY__INIT(Clay__MeasuredWord) { .startOffset = start, .length = length + 1, .width = dimensions.width, .next = -1 }, previousWord);
 | 
					                previousWord = Clay__AddMeasuredWord(CLAY__INIT(Clay__MeasuredWord) { .startOffset = start, .length = length + 1, .width = dimensions.width, .next = -1 }, previousWord);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (current == '\n') {
 | 
					            if (current == '\n') {
 | 
				
			||||||
                if (length > 1) {
 | 
					                if (length >= 1) {
 | 
				
			||||||
                    previousWord = Clay__AddMeasuredWord(CLAY__INIT(Clay__MeasuredWord) { .startOffset = start, .length = length, .width = dimensions.width, .next = -1 }, previousWord);
 | 
					                    previousWord = Clay__AddMeasuredWord(CLAY__INIT(Clay__MeasuredWord) { .startOffset = start, .length = length, .width = dimensions.width, .next = -1 }, previousWord);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                previousWord = Clay__AddMeasuredWord(CLAY__INIT(Clay__MeasuredWord) { .startOffset = end + 1, .length = 0, .width = 0, .next = -1 }, previousWord);
 | 
					                previousWord = Clay__AddMeasuredWord(CLAY__INIT(Clay__MeasuredWord) { .startOffset = end + 1, .length = 0, .width = 0, .next = -1 }, previousWord);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue