mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-26 12:17:19 +02:00
Fix color style getter
This commit is contained in:
parent
633216cd91
commit
27ac07f1ed
1 changed files with 2 additions and 2 deletions
|
@ -176,7 +176,7 @@ impl Config {
|
|||
let s = s.trim_end();
|
||||
if s.contains("color") {
|
||||
let s = s.trim_start_matches("bright ");
|
||||
let c = (s.as_bytes()[5] as char).to_digit(10).unwrap_or_default() as u8;
|
||||
let c = s.trim_start_matches("color").parse::<u8>().unwrap_or_default();
|
||||
Color::Indexed(c)
|
||||
} else if s.contains("gray") {
|
||||
let s = s.trim_start_matches("bright ");
|
||||
|
@ -231,7 +231,7 @@ impl Config {
|
|||
let s = s.trim_end();
|
||||
if s.contains("color") {
|
||||
let s = s.trim_start_matches("bright ");
|
||||
let c = (s.as_bytes()[5] as char).to_digit(10).unwrap_or_default() as u8;
|
||||
let c = s.trim_start_matches("color").parse::<u8>().unwrap_or_default();
|
||||
Color::Indexed(c.wrapping_shl(8))
|
||||
} else if s.contains("gray") {
|
||||
let s = s.trim_start_matches("bright ");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue