This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/master by this push:
     new 89686b9  Quick fix.
89686b9 is described below

commit 89686b9ee8e0536ef9a05971e86b9434c5866c6d
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Thu Jul 29 22:56:01 2021 -0700

    Quick fix.
---
 .../org/apache/nlpcraft/common/ansi/NCAnsiProgressBar.scala | 13 ++++++++++---
 .../org/apache/nlpcraft/common/ascii/NCAsciiTable.scala     |  4 ++--
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ansi/NCAnsiProgressBar.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ansi/NCAnsiProgressBar.scala
index 664c3cf..5c1e4af 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ansi/NCAnsiProgressBar.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ansi/NCAnsiProgressBar.scala
@@ -49,6 +49,7 @@ class NCAnsiProgressBar(
     private final val PB_RIGHT = s"$B${CHAR_SET(3)}$RST"
     private final val PB_EMPTY =s"$W${CHAR_SET(2)}$RST"
     private final val PB_FULL = s"$R$BO${CHAR_SET(1)}$RST"
+    private final val PB_LEAD = s"$Y$BO${CHAR_SET(4)}$RST"
 
     /**
      *
@@ -90,8 +91,14 @@ class NCAnsiProgressBar(
                 val bar = if (tick == 1) 1 else Math.round((tick.toFloat / 
totalTicks.toFloat) * dispSize)
 
                 out.print(PB_LEFT)
-                for (i <- 0 until dispSize)
-                    out.print(if (i < bar) PB_FULL else PB_EMPTY)
+                for (i <- 0 until dispSize) {
+                    if (i < bar)
+                        out.print(PB_FULL)
+                    else if (i == bar)
+                        out.print(PB_LEAD)
+                    else
+                        out.print(PB_EMPTY)
+                }
                 out.print(PB_RIGHT)
                 out.flush()
             }
@@ -130,5 +137,5 @@ class NCAnsiProgressBar(
 object NCAnsiProgressBar{
     // Active charset to use.
     private final val NON_ANSI_CHAR = '='
-    private val CHAR_SET = Seq('[', '=', '.', ']')
+    private val CHAR_SET = Seq('[', '=', '.', ']', '>')
 }
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ascii/NCAsciiTable.scala 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ascii/NCAsciiTable.scala
index b66dc0d..b538b92 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ascii/NCAsciiTable.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ascii/NCAsciiTable.scala
@@ -111,10 +111,10 @@ class NCAsciiTable {
     // Table drawing symbols.
     private val HDR_HOR = c("=")
     private val HDR_VER = c("|")
-    private val HDR_CRS = c("+")
+    private val HDR_CRS = bo(c("+"))
     private val ROW_HOR = c("-")
     private val ROW_VER = c("|")
-    private val ROW_CRS = c("+")
+    private val ROW_CRS = bo(c("+"))
 
     // Headers & rows.
     private var hdr = IndexedSeq.empty[Cell]

Reply via email to