refactor: remove legacy diff review command aliases

This commit is contained in:
2026-10-22 23:00:33 +02:00
parent e6d94dcb41
commit c12d98e348
8 changed files with 103 additions and 145 deletions
+12 -12
View File
@@ -8541,7 +8541,7 @@ fn command_input_keeps_characterwise_and_linewise_selection_highlights() {
editor.handle(Input::Right);
let ranges = editor.selections();
editor.handle(Input::Char(':'));
for ch in "diff.comment".chars() {
for ch in "comment".chars() {
editor.handle(Input::Char(ch));
}
terminal
@@ -8578,10 +8578,10 @@ fn native_visual_selection_overrides_selected_review_range_background() {
editor.execute("diff.view.toggle");
}
editor.handle(Input::Char('\t'));
editor.execute("diff.comment");
editor.execute("comment");
let directory = Directory::new();
editor.execute(&format!(
"diff.review.save {}",
"review.save {}",
directory.0.join("review.json").display()
));
editor.handle(Input::Escape);
@@ -8626,7 +8626,7 @@ fn review_editor_floats_over_the_diff_without_changing_workspace_layout() {
.find(|(pane, _)| *pane == owner)
.unwrap()
.1;
editor.execute("diff.comment");
editor.execute("comment");
let panel = editor.review_panel().expect("focused floating review");
assert_eq!(editor.pane_layout().len(), 1);
assert!(!editor.pane_layout().contains(panel));
@@ -8657,14 +8657,14 @@ fn review_editor_floats_over_the_diff_without_changing_workspace_layout() {
assert_eq!(editor.review_panel(), Some(panel));
let directory = Directory::new();
editor.execute(&format!(
"diff.review.save {}",
"review.save {}",
directory.0.join("review.json").display()
));
editor.handle(Input::Escape);
assert!(editor.review_panel().is_none());
assert_eq!(editor.pane_id(), owner);
assert_eq!(editor.context().text, source_text);
editor.execute("diff.review.edit 1");
editor.execute("review.edit 1");
assert_eq!(
editor.context().text,
"Retained draft",
@@ -8674,7 +8674,7 @@ fn review_editor_floats_over_the_diff_without_changing_workspace_layout() {
assert_eq!(editor.review_panel(), Some(panel));
editor.execute("tab.new");
editor.execute("tab.previous");
editor.execute("diff.review.edit 1");
editor.execute("review.edit 1");
assert_eq!(editor.review_panel(), Some(panel));
assert_eq!(editor.context().text, "Retained draft");
editor.execute("pane.close");
@@ -8694,7 +8694,7 @@ fn review_prose_wraps_by_default_without_changing_text_or_source_wrapping() {
let text = format!("{}wrapped_tail", "prose ".repeat(20));
let mut terminal = Terminal::new(ratatui::backend::TestBackend::new(80, 30)).unwrap();
let mut views = BufferViewports::default();
for command in ["diff.comment", "diff.review.summary"] {
for command in ["comment", "review.summary"] {
editor.execute(command);
editor.handle(Input::Char('i'));
editor.handle(Input::Paste(text.clone()));
@@ -8716,20 +8716,20 @@ fn review_prose_wraps_by_default_without_changing_text_or_source_wrapping() {
assert_eq!(editor.context().text, text);
let directory = Directory::new();
editor.execute(&format!(
"diff.review.save {}",
"review.save {}",
directory.0.join("review.json").display()
));
editor.handle(Input::Escape);
assert!(!editor.word_wrap());
}
editor.execute("diff.review.overview");
editor.execute("review.overview");
assert!(editor.word_wrap());
editor.handle(Input::Escape);
editor.execute("diff.review.edit 1");
editor.execute("review.edit 1");
editor.execute("word_wrap.toggle");
assert!(!editor.word_wrap());
editor.handle(Input::Escape);
editor.execute("diff.review.edit 1");
editor.execute("review.edit 1");
assert!(
!editor.word_wrap(),
"reopening must retain the user's toggle"