diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-12 14:28:08 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-12 14:28:08 +0800 |
| commit | 0a95bae451c1847f4f0b9601e60959f4e8e6b669 (patch) | |
| tree | 9e1cfad4f86a73176a4d738b28e7732b66fe5f97 /src/cmds/cmd/sheetedit.rs | |
| parent | 8564c8f2177dec0c2c0c031d156347fa6b4485bc (diff) | |
Refactor display utilities
Diffstat (limited to 'src/cmds/cmd/sheetedit.rs')
| -rw-r--r-- | src/cmds/cmd/sheetedit.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cmds/cmd/sheetedit.rs b/src/cmds/cmd/sheetedit.rs index 3e61642..74b0bbe 100644 --- a/src/cmds/cmd/sheetedit.rs +++ b/src/cmds/cmd/sheetedit.rs @@ -10,7 +10,9 @@ use crate::{ }, }; use cli_utils::{ - display::SimpleTable, env::get_default_editor, input::input_with_editor_cutsom, string_vec, + display::table::Table, + legacy::{env::get_default_editor, input::input_with_editor_cutsom}, + string_vec, }; use cmd_system_macros::exec; use just_enough_vcs::system::sheet_system::{mapping::LocalMapping, sheet::SheetData}; @@ -96,7 +98,7 @@ fn render_pretty_mappings(mappings: &Vec<LocalMapping>) -> String { t!("sheetedit.forward") ]; - let mut simple_table = SimpleTable::new(header); + let mut table = Table::new(header); for mapping in mappings { let mapping_str = mapping @@ -105,7 +107,7 @@ fn render_pretty_mappings(mappings: &Vec<LocalMapping>) -> String { .into_iter() .map(|s| s.to_string()) .collect::<Vec<String>>(); - simple_table.push_item(vec![ + table.push_item(vec![ format!( " {} ", mapping_str.get(0).unwrap_or(&String::default()) @@ -116,7 +118,7 @@ fn render_pretty_mappings(mappings: &Vec<LocalMapping>) -> String { format!("{} ", mapping_str.get(4).unwrap_or(&String::default())), // Forward ]); } - simple_table.to_string() + table.to_string() } crate::command_template!(); |
