From 7a2ae90fb3224cc190c0da2222fceab392fc7156 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Fri, 18 Nov 2022 20:08:11 +0300 Subject: [PATCH] Turns out it is implemented (and reformat) --- color/paintbrush.v | 15 +++------------ color/style.v | 4 ++-- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/color/paintbrush.v b/color/paintbrush.v index 1815a24..01b7dfe 100644 --- a/color/paintbrush.v +++ b/color/paintbrush.v @@ -18,20 +18,11 @@ pub fn (p &PaintBrush) apply(msg string) string { mut result := msg - // IS NOT IMPLEMENTED YET !!! - // if fg := p.fg { - // result = fg.apply(result) - // } - // if bg := p.bg { - // result = bg.apply(result) - // } - fg := p.fg or { unsafe { nil } } - if !isnil(fg) { + if fg := p.fg { result = fg.apply(result) } - bg := p.bg or { unsafe { nil } } - if !isnil(fg) { - result = bg.apply_bg(result) + if bg := p.bg { + result = bg.apply(result) } for style in p.styles { diff --git a/color/style.v b/color/style.v index d689722..13dcdab 100644 --- a/color/style.v +++ b/color/style.v @@ -8,8 +8,8 @@ pub const ( dim = Style.dim italic = Style.italic underline = Style.underline - slow_blink = Style.slow_blink - rapid_blink = Style.rapid_blink + slow_blink = Style.slow_blink + rapid_blink = Style.rapid_blink inverse = Style.inverse hidden = Style.hidden strikethrough = Style.strikethrough