Fix color manager with long code colors
authorJack Miller <jack@codezen.org>
Sun, 7 Jun 2015 16:48:22 +0000 (11:48 -0500)
committerJack Miller <jack@codezen.org>
Sun, 7 Jun 2015 16:48:22 +0000 (11:48 -0500)
canto_curses/color.py

index 602a6d4..6209fbe 100644 (file)
@@ -23,6 +23,8 @@ class CantoColorManager:
             self.color_conf = config["color"]
 
     def __call__(self, name):
+        if self.color_conf[name] > 8:
+            return "%[" + str(self.color_conf[name]) + "]"
         return "%" + str(self.color_conf[name])
 
 cc = CantoColorManager()