aboutsummaryrefslogtreecommitdiff
path: root/src/readline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/readline.rs')
-rw-r--r--src/readline.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/readline.rs b/src/readline.rs
index ea195ee..d689f95 100644
--- a/src/readline.rs
+++ b/src/readline.rs
@@ -12,6 +12,7 @@ use directories::ProjectDirs;
12 12
13use regex::Regex; 13use regex::Regex;
14 14
15use crate::error::CalcError;
15use crate::eval_math_expression; 16use crate::eval_math_expression;
16 17
17pub struct RLHelper { 18pub struct RLHelper {
@@ -67,6 +68,7 @@ impl Highlighter for LineHighlighter {
67 } 68 }
68 Owned(coloured) 69 Owned(coloured)
69 } 70 }
71 Err(CalcError::Help) => Owned(line.replace("help", "\x1b[36mhelp\x1b[0m")),
70 Err(_) => Owned(format!("\x1b[31m{}\x1b[0m", line)), 72 Err(_) => Owned(format!("\x1b[31m{}\x1b[0m", line)),
71 } 73 }
72 } 74 }