fixed error win unformatedtext class that resulted in println before each word.
This commit is contained in:
		
							parent
							
								
									7ac12a8ad5
								
							
						
					
					
						commit
						a3b6388c9e
					
				| 
						 | 
				
			
			@ -47,7 +47,7 @@ public class TextOutput {
 | 
			
		|||
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    if (word.length() >= columnWidth - currentLength) {
 | 
			
		||||
                    if (word.length() >= columnWidth - currentLength && !(currentLength == 0)) {
 | 
			
		||||
                        currentLength = 0;
 | 
			
		||||
                        System.out.println();
 | 
			
		||||
                    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,11 +15,12 @@ class TextOutputTest {
 | 
			
		|||
    public void setup(){
 | 
			
		||||
        textOutput = new TextOutput();
 | 
			
		||||
        textOutput.formatFix(9);
 | 
			
		||||
        textOutput.formatRaw();
 | 
			
		||||
        //textOutput.formatRaw();
 | 
			
		||||
        text = new ArrayList<>();
 | 
			
		||||
        text.add("123456789");
 | 
			
		||||
        text.add("1234");
 | 
			
		||||
        text.add("12 12 12");
 | 
			
		||||
        text.add("     ");
 | 
			
		||||
        text.add("1eeeeeee8597389751");
 | 
			
		||||
        text.add("TextTextTextTextTextTextTextTextTextTextTextTextTextText TextTextTextTextTextTextTextTextTextTextTextText TextTextText");
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue