Skip to content

Commit 4611c28

Browse files
author
ComputelessComputer
committed
add tertiary checklist checkbox state for in-progress tasks
1 parent 7bcb240 commit 4611c28

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aipm"
3-
version = "0.8.10"
3+
version = "0.8.11"
44
edition = "2021"
55

66
[dependencies]

src/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4746,8 +4746,11 @@ fn render_checklist_tab(stdout: &mut Stdout, app: &App, cols: u16, rows: u16) ->
47464746
let task = &app.tasks[task_idx];
47474747
let is_sel = draw_i == sel;
47484748
let y = list_start_y + (draw_i - scroll) as u16;
4749-
let done = task.progress == Progress::Done;
4750-
let checkbox = if done { "[x]" } else { "[ ]" };
4749+
let checkbox = match task.progress {
4750+
Progress::Done => "[x]",
4751+
Progress::InProgress => "[·]",
4752+
_ => "[ ]",
4753+
};
47514754
let has_children = app.tasks.iter().any(|t| t.parent_id == Some(task.id));
47524755
let expand_icon = if !is_child && has_children {
47534756
if app.checklist_expanded.contains(&task.id) {
@@ -4782,7 +4785,7 @@ fn render_checklist_tab(stdout: &mut Stdout, app: &App, cols: u16, rows: u16) ->
47824785
SetForegroundColor(Color::Black),
47834786
SetBackgroundColor(Color::White)
47844787
)?;
4785-
} else if done {
4788+
} else if task.progress == Progress::Done {
47864789
queue!(stdout, SetForegroundColor(Color::DarkGrey))?;
47874790
} else {
47884791
let status_color = match task.progress {

0 commit comments

Comments
 (0)