Skip to content

Commit a2aee7a

Browse files
committed
---
yaml --- r: 3846 b: refs/heads/master c: 043096e h: refs/heads/master v: v3
1 parent 2ae6c26 commit a2aee7a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: f7a1006a07b396ed239c08d3576597dad103e064
2+
refs/heads/master: 043096ea0ab0369fd32210bb9c75bdc9d5820cb0

trunk/src/lib/termivec.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,15 @@ fn reset(ioivec::buf_writer writer) {
4848
}
4949

5050
fn color_supported() -> bool {
51-
auto supported_terms = ["xterm-color", "xterm", "screen-bce"];
51+
auto supported_terms = ~["xterm-color", "xterm", "screen-bce"];
5252
ret alt (generic_os::getenv("TERM")) {
53-
case (option::some(?env)) { vec::member(env, supported_terms) }
54-
case (option::none) { false }
53+
case (option::some(?env)) {
54+
for (str term in supported_terms) {
55+
if (str::eq(term, env)) { true }
56+
}
57+
false
58+
}
59+
case (option::none) { false }
5560
};
5661
}
5762

0 commit comments

Comments
 (0)