diff options
author | Enrico Tassi <gareuselesinge@debian.org> | 2015-11-13 11:31:34 +0100 |
---|---|---|
committer | Enrico Tassi <gareuselesinge@debian.org> | 2015-11-13 11:31:34 +0100 |
commit | 2280477a96e19ba5060de2d48dcc8fd7c8079d22 (patch) | |
tree | 074182834cb406d1304aec4233718564a9c06ba1 /lib/terminal.ml | |
parent | 0aa2544d04dbd4b6ee665b551ed165e4fb02d2fa (diff) |
Imported Upstream version 8.5~beta3+dfsg
Diffstat (limited to 'lib/terminal.ml')
-rw-r--r-- | lib/terminal.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/terminal.ml b/lib/terminal.ml index 0f6b23af..58851ed2 100644 --- a/lib/terminal.ml +++ b/lib/terminal.ml @@ -117,7 +117,7 @@ let is_extended = function | `INDEX _ | `RGB _ -> true | _ -> false -let eval st = +let repr st = let fg = match st.fg_color with | None -> [] | Some c -> @@ -152,7 +152,10 @@ let eval st = | Some true -> [7] | Some false -> [27] in - let tags = fg @ bg @ bold @ italic @ underline @ negative in + fg @ bg @ bold @ italic @ underline @ negative + +let eval st = + let tags = repr st in let tags = List.map string_of_int tags in Printf.sprintf "\027[%sm" (String.concat ";" tags) |