mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
Make table not shift in multiple selection mode
This commit is contained in:
parent
18e9f15851
commit
34f6dcca34
2 changed files with 8 additions and 8 deletions
10
src/table.rs
10
src/table.rs
|
@ -367,22 +367,22 @@ where
|
|||
|
||||
let highlight_symbol = match state.mode {
|
||||
TableMode::MultipleSelection => {
|
||||
let s = self.highlight_symbol.unwrap_or("• ").trim_end();
|
||||
format!("[{}] ", s)
|
||||
let s = self.highlight_symbol.unwrap_or("•").trim_end();
|
||||
format!("{} ", s)
|
||||
}
|
||||
TableMode::SingleSelection => self.highlight_symbol.unwrap_or("").to_string(),
|
||||
};
|
||||
|
||||
let mark_symbol = match state.mode {
|
||||
TableMode::MultipleSelection => {
|
||||
let s = self.mark_symbol.unwrap_or("✓ ").trim_end();
|
||||
format!("[{}] ", s)
|
||||
let s = self.mark_symbol.unwrap_or("☑").trim_end();
|
||||
format!("{} ", s)
|
||||
}
|
||||
TableMode::SingleSelection => self.highlight_symbol.unwrap_or("").to_string(),
|
||||
};
|
||||
|
||||
let blank_symbol = match state.mode {
|
||||
TableMode::MultipleSelection => "[ ] ".to_string(),
|
||||
TableMode::MultipleSelection => "☐ ".to_string(),
|
||||
TableMode::SingleSelection => iter::repeat(" ").take(highlight_symbol.width()).collect::<String>(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue