Skip to content

Commit 07439ec

Browse files
committed
Fix shortcut key matching to handle whitespace in input
- Trim user input value before matching shortcuts to prevent failures - when spaces are accidentally included during quick pick navigation. - This ensures shortcuts work reliably regardless of input formatting. close #43
1 parent 1dfdd37 commit 07439ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extension/src/command-executor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ export const createQuickPickWithShortcuts = (
114114
});
115115

116116
quickPick.onDidChangeValue((value) => {
117-
const shortcutItem = findShortcutItem(config.items, value);
117+
const trimmedValue = value.trim();
118+
const shortcutItem = findShortcutItem(config.items, trimmedValue);
118119

119120
if (!shortcutItem) return;
120121
executeCommand(shortcutItem);

0 commit comments

Comments
 (0)