mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
Fix incorrect marks
This commit is contained in:
parent
ae2fc084c6
commit
dd3bf47cae
2 changed files with 13 additions and 4 deletions
11
src/app.rs
11
src/app.rs
|
@ -242,6 +242,15 @@ impl TTApp {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn draw_debug(&mut self, f: &mut Frame<impl Backend>) {
|
||||
let area = centered_rect(50, 50, f.size());
|
||||
f.render_widget(Clear, area);
|
||||
let t = format!("{:?}", self.marked);
|
||||
let p = Paragraph::new(Text::from(t))
|
||||
.block(Block::default().borders(Borders::ALL).border_type(BorderType::Rounded));
|
||||
f.render_widget(p, area);
|
||||
}
|
||||
|
||||
pub fn draw_calendar(&mut self, f: &mut Frame<impl Backend>) {
|
||||
let dates_with_styles = self.get_dates_with_styles();
|
||||
let rects = Layout::default()
|
||||
|
@ -819,7 +828,6 @@ impl TTApp {
|
|||
self.export_contexts()?;
|
||||
self.update_tags();
|
||||
}
|
||||
self.update_task_table_state();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -1934,6 +1942,7 @@ impl TTApp {
|
|||
}
|
||||
}
|
||||
}
|
||||
self.update_task_table_state();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -410,7 +410,7 @@ where
|
|||
{
|
||||
match state.mode {
|
||||
TableMode::MultipleSelection => {
|
||||
if state.marked.contains(&i) {
|
||||
if state.marked.contains(&(i + state.offset)) {
|
||||
(d, highlight_style, mark_symbol.to_string())
|
||||
} else {
|
||||
(d, highlight_style, blank_symbol.to_string())
|
||||
|
@ -420,14 +420,14 @@ where
|
|||
}
|
||||
}
|
||||
Row::Data(d) => {
|
||||
if state.marked.contains(&i) {
|
||||
if state.marked.contains(&(i + state.offset)) {
|
||||
(d, default_style, mark_symbol.to_string())
|
||||
} else {
|
||||
(d, default_style, blank_symbol.to_string())
|
||||
}
|
||||
}
|
||||
Row::StyledData(d, s) => {
|
||||
if state.marked.contains(&i) {
|
||||
if state.marked.contains(&(i + state.offset)) {
|
||||
(d, s, mark_symbol.to_string())
|
||||
} else {
|
||||
(d, s, blank_symbol.to_string())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue