fix Tabular: table was broken if value ended with \n v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun, 19 Jan 2014 18:30:21 +0100
branchv_0
changeset 16784aaa91642bf
parent 166 5488c2dcf680
child 168 0e8108da0305
fix Tabular: table was broken if value ended with \n
java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularFormatter.java
     1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularFormatter.java	Fri Jan 17 23:24:07 2014 +0100
     1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularFormatter.java	Sun Jan 19 18:30:21 2014 +0100
     1.3 @@ -23,6 +23,7 @@
     1.4  import static info.globalcode.sql.dk.Functions.rpad;
     1.5  import static info.globalcode.sql.dk.Functions.repeat;
     1.6  import java.util.List;
     1.7 +import java.util.Scanner;
     1.8  
     1.9  /**
    1.10   * <p>Prints human-readable output – tables of result sets and text messages with update counts.</p>
    1.11 @@ -275,5 +276,9 @@
    1.12  				out.print(TerminalColor.Red, "↲");
    1.13  			}
    1.14  		}
    1.15 +
    1.16 +		if (valueString.endsWith("\n")) {
    1.17 +			out.print(TerminalColor.Red, "↲");
    1.18 +		}
    1.19  	}
    1.20  }