From 94fd0750802a3f9d871f3c28169d2cbbfab7bb15 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Sun, 9 Aug 2026 00:17:17 +0700 Subject: [PATCH] fix(keybindings): stop the menu ellipsis trailing off inside a sentence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rebinding a chord that another action holds prints "{action} took the shortcut from {previous}, which is now unset." Both names come off the keybindings page, where a command that opens something carries a "…" — so the note read "Rename Tab… took the shortcut from Close Pane / Tab", and the marker that means "this opens a dialog" turned into a sentence losing its nerve. The ellipsis is a menu convention, not punctuation, so it comes off when the name is interpolated into prose. The rows themselves keep it. --- src/ui/app.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ui/app.rs b/src/ui/app.rs index 89080831..fec091b5 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -5107,12 +5107,22 @@ impl Tty7App { .chain(crate::ui::keymap::extra_bindings(cx)) .find(|(a, k)| *k == spec && *a != action) .map(|(a, _)| a); + // A trailing "…" on an action name marks a command that opens + // something; it is not punctuation, and inside a sentence it reads as + // the sentence trailing off — "Rename Tab… took the shortcut from". + let in_prose = |name: &str| name.trim_end_matches('…').to_string(); let note = displaced.as_ref().map(|other| { t_fmt( L10nKey::AppKeybindingDisplacedNote, &[ - ("action", &crate::ui::keymap::action_entry(&action).1), - ("previous", &crate::ui::keymap::action_entry(other).1), + ( + "action", + &in_prose(&crate::ui::keymap::action_entry(&action).1), + ), + ( + "previous", + &in_prose(&crate::ui::keymap::action_entry(other).1), + ), ], ) });