F1: cosmetics: regex error reason, one date format, Close Tab
- Find shows a bad regex as "invalid pattern: unclosed group": the search crate keeps only the parser's reason, the UI drops the invalid-params prefix (userMessage). - Dates read YYYY-MM-DD / YYYY-MM-DD HH:mm in local time everywhere (i18n formatDate/formatDateTime): Log, stash list, blame, recovery. - buffer.close is "Close Tab" in the palette as in the menu; an engine test keeps palette labels starting with their menu item's wording. - Docs: architecture, install (Jump List), localization parity, checklist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1b6bd1f870
commit
33a7185d75
18 changed files with 147 additions and 52 deletions
|
|
@ -197,7 +197,7 @@ impl Command for Close {
|
|||
fn spec(&self) -> &CommandSpec {
|
||||
&CommandSpec {
|
||||
id: "buffer.close",
|
||||
label: "Close Buffer",
|
||||
label: "Close Tab",
|
||||
menu_path: Some("File/Close Tab"),
|
||||
default_shortcut: Some("Mod+W"),
|
||||
params: "{ id: number, force?: bool (discard unsaved changes) }; returns null; fails with unsaved_changes if the buffer is dirty and force is not set",
|
||||
|
|
|
|||
|
|
@ -462,6 +462,25 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
/// The palette label of a menu command starts with the menu item's
|
||||
/// wording; it may add context the menu gives by its place ("Rename
|
||||
/// Symbol" for Refactor › Rename…), but never says it differently
|
||||
/// ("Close Buffer" for File › Close Tab).
|
||||
#[test]
|
||||
fn a_command_in_a_menu_has_the_menu_items_wording_in_the_palette() {
|
||||
let engine = Engine::new().unwrap();
|
||||
let differing: Vec<String> = engine
|
||||
.list_commands()
|
||||
.iter()
|
||||
.filter_map(|c| {
|
||||
let item = c.menu_path.as_deref()?.rsplit('/').next()?;
|
||||
(!c.label.starts_with(item.trim_end_matches('…')))
|
||||
.then(|| format!("{}: {} / {item}", c.id, c.label))
|
||||
})
|
||||
.collect();
|
||||
assert_eq!(differing, Vec::<String>::new());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lists_commands_with_metadata() {
|
||||
let mut engine = Engine::new().unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue