diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-11-13 04:36:45 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-11-13 04:36:45 -0500 |
commit | 4b6bf2141459caf628f952678bf886a18927d8d2 (patch) | |
tree | 97d32a314b2eac6fbe0aabf666bd838021c10bb3 /src/history.rs | |
parent | 153d4c4161fa8fba350dcc51ab14b08635c53e99 (diff) | |
download | nbsh-4b6bf2141459caf628f952678bf886a18927d8d2.tar.gz nbsh-4b6bf2141459caf628f952678bf886a18927d8d2.zip |
highlight the focused entry
Diffstat (limited to 'src/history.rs')
-rw-r--r-- | src/history.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/history.rs b/src/history.rs index 3615ec9..83744ce 100644 --- a/src/history.rs +++ b/src/history.rs @@ -233,7 +233,12 @@ impl History { out.write_str(&format!("{} ", status.code().unwrap())); } } + if focus == Some(idx) { + out.set_fgcolor(textmode::color::BLACK); + out.set_bgcolor(textmode::color::CYAN); + } out.write_str("$ "); + out.reset_attributes(); if entry.running() { out.set_bgcolor(textmode::Color::Rgb(16, 64, 16)); } |