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

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


The following commit(s) were added to refs/heads/NLPCRAFT-468 by this push:
     new 74eba43  Update NCAnsi.scala
74eba43 is described below

commit 74eba438189829e4bcca36a5f01982a581d27fbd
Author: Aaron Radzinski <[email protected]>
AuthorDate: Sat Oct 9 09:39:49 2021 -0700

    Update NCAnsi.scala
---
 .../main/scala/org/apache/nlpcraft/common/ansi/NCAnsi.scala  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ansi/NCAnsi.scala 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ansi/NCAnsi.scala
index dc9be26..5e05932 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ansi/NCAnsi.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ansi/NCAnsi.scala
@@ -51,8 +51,8 @@ sealed trait NCAnsi extends LazyLogging:
     private final val CYAN_B = s"${CSI}46m"
     private final val WHITE_B = s"${CSI}47m"
 
-    def ansi256Fg(color: Int) = if (isEnabled) s"[38;5;${color}m" else ""
-    def ansi256Bg(color: Int) = if (isEnabled) s"[48;5;${color}m" else ""
+    def ansi256Fg(color: Int): String = if (isEnabled) s"[38;5;${color}m" 
else ""
+    def ansi256Bg(color: Int): String = if (isEnabled) s"[48;5;${color}m" 
else ""
     def ansi256Fg(fgColor: Int, s: Any): String = 
s"${ansi256Fg(fgColor)}${s.toString}$ansiReset"
     def ansi256(fgColor: Int, bgColor: Int, s: Any): String = 
s"${ansi256Fg(fgColor)}${ansi256Bg(bgColor)}${s.toString}$ansiReset"
 
@@ -80,8 +80,8 @@ sealed trait NCAnsi extends LazyLogging:
     private final val CURSOR_POS_RESTORE = s"${CSI}u"
     private final val CURSOR_LINE_HOME = s"${CSI}0G"
     private final val CURSOR_SCREEN_HOME = s"${CSI}H"
-    private final val CURSOR_HIDE = s"${CSI}?25l"
-    private final val CURSOR_SHOW = s"${CSI}?25h"
+    private final val CURSOR_HIDE = s"$CSI?25l"
+    private final val CURSOR_SHOW = s"$CSI?25h"
 
     def isEnabled: Boolean = !NCUtils.isSysEnvTrue(PROP)
 
@@ -214,7 +214,7 @@ object NCAnsi extends NCAnsi:
 
     /**
       *
-      * @param f
+      * @param f ANSI-support enable/disable flag.
       */
     def setEnabled(f: Boolean): Unit = System.setProperty(PROP, (!f).toString)
 
@@ -223,5 +223,5 @@ object NCAnsi extends NCAnsi:
       */
     def ackStatus(): Unit =
         if isEnabled then
-            logger.info(s"${NCUtils.bgRainbow4Bit("ANSI")} coloring is 
enabled. Use '-D${ansiCyanFg}NLPCRAFT_ANSI_COLOR_DISABLED${ansiReset}=true' to 
disable it.", 130, 147)
+            logger.info(s"${NCUtils.bgRainbow4Bit("ANSI")} coloring is 
enabled. Use '-D${ansiCyanFg}NLPCRAFT_ANSI_COLOR_DISABLED$ansiReset=true' to 
disable it.", 130, 147)
 

Reply via email to