summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2023-05-26 00:19:28 -0400
committerGitHub <noreply@github.com>2023-05-26 00:19:28 -0400
commit6b9663a2c20b6483c1f4b1b9cc964719cfe43a0e (patch)
treeb8990f33067d077e5622f7c4e03e341f6f6e876a
parent69318465ae82281c40b68d3478232e0119dba414 (diff)
other: clean up some fixmes (#1171)
-rw-r--r--src/app/query.rs3
-rw-r--r--src/bin/main.rs1
-rw-r--r--src/lib.rs15
3 files changed, 10 insertions, 9 deletions
diff --git a/src/app/query.rs b/src/app/query.rs
index eb2d281f..17cc1c44 100644
--- a/src/app/query.rs
+++ b/src/app/query.rs
@@ -338,7 +338,8 @@ pub fn parse_query(
let mut condition: Option<QueryComparison> = None;
let mut value: Option<f64> = None;
- // TODO: Jeez, what the heck did I write here... add some tests and clean this up, please.
+ // TODO: Jeez, what the heck did I write here... add some tests and clean this up in the
+ // future.
if content == "=" {
condition = Some(QueryComparison::Equal);
if let Some(queue_next) = query.pop_front() {
diff --git a/src/bin/main.rs b/src/bin/main.rs
index b7097991..bb152943 100644
--- a/src/bin/main.rs
+++ b/src/bin/main.rs
@@ -175,7 +175,6 @@ fn main() -> Result<()> {
break;
}
BottomEvent::Resize => {
- // FIXME: This is bugged with frozen?
try_drawing(&mut terminal, &mut app, &mut painter)?;
}
BottomEvent::KeyInput(event) => {
diff --git a/src/lib.rs b/src/lib.rs
index 83938c8d..674593dd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -433,12 +433,12 @@ pub fn create_input_thread(
if let Ok(poll) = poll(Duration::from_millis(20)) {
if poll {
if let Ok(event) = read() {
- // FIXME: Handle all other event cases.
match event {
- // TODO: Might want to debounce this in the future, or take into account the actual resize
- // values. Maybe we want to keep the current implementation in case the resize event might
- // not fire... not sure.
Event::Resize(_, _) => {
+ // TODO: Might want to debounce this in the future, or take into account the actual resize
+ // values. Maybe we want to keep the current implementation in case the resize event might
+ // not fire... not sure.
+
if sender.send(BottomEvent::Resize).is_err() {
break;
}
@@ -449,8 +449,7 @@ pub fn create_input_thread(
}
}
Event::Key(key) if key.kind == KeyEventKind::Press => {
- // For now, we only care about keydown events. This may change in the future.
-
+ // For now, we only care about key down events. This may change in the future.
if sender.send(BottomEvent::KeyInput(key)).is_err() {
break;
}
@@ -472,7 +471,9 @@ pub fn create_input_thread(
}
}
},
- _ => (),
+ Event::Key(_) => {}
+ Event::FocusGained => {}
+ Event::FocusLost => {}
}
}
}