summaryrefslogtreecommitdiff
path: root/source/style
diff options
context:
space:
mode:
Diffstat (limited to 'source/style')
-rw-r--r--source/style/package.d8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/style/package.d b/source/style/package.d
index 57e87c2..2e5ff7f 100644
--- a/source/style/package.d
+++ b/source/style/package.d
@@ -5,5 +5,11 @@ import std.conv;
import style.color;
string set(string s, int code) {
- return ("%{\x1b[" ~ to!string(code) ~ "m%}") ~ s ~ ("%{\x1b[" ~ to!string((Color.reset + 0)) ~ "m%}");
+ return ("%{\x1b[" ~ to!string(code) ~ "m%}") ~ s ~ (
+ "%{\x1b[" ~ to!string((Color.reset + 0)) ~ "m%}");
+}
+
+string set(string s, int code, bool close) {
+ return ("%{\x1b[" ~ to!string(code) ~ "m%}") ~ s ~ (close ? (
+ "%{\x1b[" ~ to!string((Color.reset + 0)) ~ "m%}") : "");
}